need explaination on this power-ups example
Posted: Mon Apr 27, 2015 2:53 pm
someone showed me this example of power-ups using the stack function, but i still couldnt understand how it works since there is a problem on the "boxes" on the right hand side of the word "inventory", there are the boxes where the power-ups will appear when the player collected the power up, so i'd like some expert to explain to me why it tell me "invalid option to this actor" when i trying to click any of the option under "animation", and the most thing i need to know is how the stack actually works here, and it would be better if someone could tell me how to make this with steps, thank you.
i do understand the stack in the global code, but now what trouble me is the code in the "item", what does " sprintf(powerUp, clonename);" do? also how does the item will appear on the boxes when the player collected the item?
i gonna use the same concept and use it on my simple game, where a car collide with a "shield" power ups, it store in the stack, then when i use the power-up, the shield will appear around the car and protect it while moving, and i need help on how to spawn the "shield" around the car and follows it even it moves when the key is pressed.
i do understand the stack in the global code, but now what trouble me is the code in the "item", what does " sprintf(powerUp, clonename);" do? also how does the item will appear on the boxes when the player collected the item?
i gonna use the same concept and use it on my simple game, where a car collide with a "shield" power ups, it store in the stack, then when i use the power-up, the shield will appear around the car and protect it while moving, and i need help on how to spawn the "shield" around the car and follows it even it moves when the key is pressed.