How do I

Get help using Construct 2

Post » Thu Feb 18, 2016 2:25 pm

How can I stop the random times a sprite occurs after it's health gets to zero? On 'Start of layout' I set the random to 2, 4 sec. Sprite is destroyed, but random times doesn't stop and continues to repeat.
B
4
Posts: 8
Reputation: 218

Post » Thu Feb 18, 2016 9:28 pm

Try to enter this condition: if health is not equal to 0 <=> set variable to random(2,4)

A suggest: if you intend to get ints (2,3,4) it's better to use "choose" rather than "random"

ex. choose (2, 3, 4)
B
74
S
13
G
4
Posts: 1,006
Reputation: 8,060

Post » Sat Feb 20, 2016 1:33 pm

Thanks for the suggestion. Didn't solve the issue but did show that the health counter is not counting down. Have global variable 'health' set to 5, and sprite instance variable 'health' set to 5, but doesn't respond to 'subtract 1 from health' on collisions with bullets. Looking for a solution to that now
B
4
Posts: 8
Reputation: 218


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 30 guests