Powerup Counter
Posted: Wed Aug 08, 2012 3:47 am
				
				(No icons, sorry)
I haven't found anywhere (or maybe I didn't look hard enough) showing how to do this in Skulltag, I suppose making a counter is easy enough... but somehow I ended up with a headache, I feel silly... anyways
For those still using Skulltag here's a powerup counter, feel free to use it, and/or tinker with it to make it more efficient
(I tested a wad that used one made in SBARINFO with Zandronum, and it gave me an error... so this for me is the only way, I could be wrong)
EDIT:
Here is Llewellyn's version of the code (Which I felt it was better):
And attached example
https://www.dropbox.com/s/ninx4iet3up1u ... Example.7z
Just summon a "GenericPowerup" or a DoomSphere
			I haven't found anywhere (or maybe I didn't look hard enough) showing how to do this in Skulltag, I suppose making a counter is easy enough... but somehow I ended up with a headache, I feel silly... anyways
For those still using Skulltag here's a powerup counter, feel free to use it, and/or tinker with it to make it more efficient
(I tested a wad that used one made in SBARINFO with Zandronum, and it gave me an error... so this for me is the only way, I could be wrong)
EDIT:
Here is Llewellyn's version of the code (Which I felt it was better):
Code: Select all
script 1 (void)
{
    /* It does initializes powerup, does powerup-- 
    which is the same as "powerup = powerup -1"
    and that the countdown has not ended. */
    for (int powerup = 60;powerup > -1; powerup--)
    {
    //This makes sure the player is still alive
    if (GetActorProperty (0, APROP_Health) < 0)
        terminate;
    if (CheckInventory("PowerupActive") > 1)
    {
        TakeInventory ("PowerupActive", 1);
        powerup = 60; //Restarts the timer!
    }
    SetFont("BIGFONT");
    SetHudSize(320, 240, 1);
    HudMessage(i:powerup; HUDMSG_PLAIN, 1, CR_WHITE, 308.0, 127.0, 2.0);
    //This prevents the delay by putting it at the end
    Delay(35);
    }
}
https://www.dropbox.com/s/ninx4iet3up1u ... Example.7z
Just summon a "GenericPowerup" or a DoomSphere