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!
<img src="http://oi57.tinypic.com/1491kef.jpg" border="0" />
Thanks in advance!
Wait does not block for 12 seconds, otherwise your whole game would lock up. Try adding System::'Trigger once while true' to your condition.
Your event is happening every tick for 12 seconds, adding a trigger once condition should take care of it.
Thanks, that solved the problem. Wasn't aware of that condition until now, and I have been using CS2 for a year now! xD
There is a problem, I have an enemy spawner and now I can only kill one enemy because the event will only play once.
Add a for each enemy condition, that way it will play only once for each enemy.
Develop games in your browser. Powerful, performant & highly capable.
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:
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)
Oh and sorry for the tripple post, but also CitizenHP is a instance variable not global.
Add a system for each enemy condition.
This will pick each instance of the enemy seperately.
Or just add another condition that goes like "Animation dead is not playing".