RPG Starter

by Falacy
An Open Source Demo/Game with everything you'll need to get started on your very own BYOND Game!
ID:292225
 
i been working on my dbz game and i need to know how to code powerup plz help me
This is just brush through the algorithm.

Start a do while loop with the condition (src.pl!=src.max_pl || src.ki!=src.max_ki) and during each iteration add them up.Put a sleep() to delay.

Those were the basic requirements.Sfx and gfx are basically extra things.

mob/proc/Powerup()
do
src.pl=min(src.max_pl,src.pl+0.1*src.max_pl)
src.ki=min(src.max_ki,src.ki+0.1*src.max_ki)
sleep(10) //how much ever you like, you could even be more dynamic by adjust the sleep time with respect to your pl and ki.
while(src.pl!=src.max_pl || src.ki!=src.max_ki)