Page 1 of 1

Kick Stamina

Posted: Sun Feb 21, 2021 11:28 am
by YeeTee2
How would I add stamina to this kick? I'm not great at Zscript or Decorate.

Re: Kick Stamina

Posted: Sun Feb 21, 2021 12:34 pm
by Jarewill
You'd have to define a stamina actor first. Something like this:

Code: Select all

ACTOR StaminaActor : Inventory
{
    Inventory.MaxAmount 20 //Replace 20 with maximum stamina for the player
}
And then modify the Kick script to check for the stamina actor and take away an amount of it:
Spoiler:
You will also need a script to restore stamina to the player. (Unless it's supposed to be restored another way) This script does that:
Spoiler:

Re: Kick Stamina

Posted: Mon Feb 22, 2021 6:58 am
by YeeTee2
That was very simple, thank you!

Re: Kick Stamina

Posted: Mon Feb 22, 2021 7:11 am
by YeeTee2
So, I added it to the linked pk3, and modified it so every kick takes all stamina, and 4 seconds later stamina is completely full. It doesn't seem to work
http://www.mediafire.com/file/rel0on0la ... 2.pk3/file

Re: Kick Stamina

Posted: Mon Feb 22, 2021 7:49 am
by Jarewill
Sorry for not specifying, that part in the Kick script had to be replaced, not added.
The scripts should look like this:
Spoiler:
Also don't forget to compile the script, you will have to press this blue arrow in upper right corner of the editor in SLADE:

You will also need to specify a path to ACC to compile it properly.

Re: Kick Stamina

Posted: Mon Feb 22, 2021 7:59 am
by YeeTee2
Ah, thank you