Help needed Transforming powerup

X

XjhopX

Guest
I am just wondering if someone could help me with how to add
either a power up you pick up and lasts till you get hit say 4 times or a power up you pick up and have to press a button to use but times out? what would be easier?
I have a basic understanding of GML but a drag and drop option would be cool aswell it is the last hurdle in my proto typing
 

TheouAegis

Member
Well, one that happens automatically is easier because it involves making the fewest number of changes to your pre-existing code.
 
S

siggi

Guest
okok on picking up the powerup, set the player's powerup variable to like 1; then set an alarm to like 300; then when the alarm runs out (alarm event) set the powerup var back to 0 (and in the shooting event or whatever it does, check to make sure the var is 1); or when picking up the powerup, set a var to like 5, subtract 1 from it on pc touching an enemy, same check dealio in the shoot event. and dont forget to initailize the variable (set it to 0 or something when creating the player) :)
 
Top