How do I stop the loop?

Get help using Construct 2

Post » Thu Jan 30, 2014 5:52 pm

So basically on killed the enemy should drop some cash, and play the animation dead. Pretty simple, right?

The only problem is, it does not stop spawning in money, then after 12 seconds finally it stops because that is when the enemy's body is removed from the world. Here is an image of the setup, please help!



Thanks in advance!
-Dilk
B
8
S
1
Posts: 62
Reputation: 627

Post » Thu Jan 30, 2014 5:59 pm

Wait does not block for 12 seconds, otherwise your whole game would lock up. Try adding System::'Trigger once while true' to your condition.
ImageImageImage
B
71
S
22
G
259
Posts: 3,794
Reputation: 143,704

Post » Thu Jan 30, 2014 6:01 pm

Your event is happening every tick for 12 seconds, adding a trigger once condition should take care of it.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Jan 30, 2014 6:43 pm

Thanks, that solved the problem. Wasn't aware of that condition until now, and I have been using CS2 for a year now! xD
B
8
S
1
Posts: 62
Reputation: 627

Post » Fri Jan 31, 2014 1:00 pm

There is a problem, I have an enemy spawner and now I can only kill one enemy because the event will only play once.

http://oi61.tinypic.com/14tstu9.jpg
B
8
S
1
Posts: 62
Reputation: 627

Post » Fri Jan 31, 2014 1:03 pm

Add a for each enemy condition, that way it will play only once for each enemy.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Fri Jan 31, 2014 5:33 pm

How do I do that when its the same enemy? (It's the same enemy, there is a spawner making copies every 3 - 12 seconds)

I put the bullet damage script & spawner in this image:
http://oi62.tinypic.com/bhwupw.jpg
B
8
S
1
Posts: 62
Reputation: 627

Post » Fri Jan 31, 2014 5:34 pm

Bullet attribute is what makes it seem as if the citizen is actually walking, at certain points I have it set to set the angle of motion.

(Just a tip for ppl who make future games with Citizens :D)
B
8
S
1
Posts: 62
Reputation: 627

Post » Fri Jan 31, 2014 5:35 pm

Oh and sorry for the tripple post, but also CitizenHP is a instance variable not global.
B
8
S
1
Posts: 62
Reputation: 627

Post » Fri Jan 31, 2014 5:44 pm

Add a system for each enemy condition.

This will pick each instance of the enemy seperately.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 26 guests