Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
so i have a object that clones enemy (ai) the first time i shoot him he dies but when the clone spawns i can shoot it its invincible |
||||
|
or can i just a have a spawn code |
||||
|
That's because you are cloning that node after its hp is zero. Either you will need to set that clones hp variable, or clone a node that is kept somewhere off the map. |
||||
|
Yeah, I had the same problem when I was experimenting with tps/fps level. Here is my ccb with working dead-enemies-stay-dead code: https://www.newgrounds.com/dump/... I was able to fix the issue with a help from @tim12345 , actually he fixed the issue for me, I was clueless about some CC coding 'shortcuts' :) Here is the entire process in this thread if you wanna understand it better: https://www.ambiera.com/forum.ph... I stopped with experimenting at one point so there is a half-working gun tilt while the player is walking but the shooting tilt is implemented :) Also the gun that I'm using in ccb is creative-commons model so you can use it too if you like it & if it fits your game: Cheers! |
||||
|
can i have a spawn code or just how to set a clone without it being invincible. cheers |
||||
|
like u have good advice but this doesnt sort the bug how the object clones the ai every 10 seconds as spawner but the first ai u can kill but when they spawn in you cant kill them pls help |
||||
|
This is the code that controls how individual enemy acts if his health is higher than 0 (I've created an image because this forum hides the 'hashtag' character/symbol): In the ccb I've uploaded it's in the enemy model under 'Every few seconds do something' sett to 1500. The code (that you need is first 4 lines) gets the individual value of the health (of the model that it's in) every 1500 ms. All you have to do is modify it to do something if health is higher than 0 (like it's here) or if health is lower than 0. |
||||
|
cheers |
|