Spawn actor
raciukas22
Member, PRO Posts: 47
I had integer and every time I spawned actor after integer numbers increased was fine until 3 after this actor just does not spawn anymore another actor. what could be an issue?
Comments
Your code is most probably set up incorrectly.
but it worked first three times
Can we take a look at the code ?
I have added a screenshot of the code that does not work anymore, all three above worked.
Many thanks
@raciukas22 I don't know what your trying to do with that but this is what you have now, focus on your conditions.
if game.animate = 4 ( only when its equal to 4) change self.animate5 to self.animate5+1 (once only) so in other words if self.animate5 was 1 this condition would change it to 2 , if it was 2 it would change it to 3 .. if it was 3 it would change it to 4 ..
Then you have if self.animate5 = 4 (only when its equal to 4) you have destroy after 0.1 seconds first and then spawn actor. (you should put the spawn behavior above the destroy.)
These rules would only trigger upon your conditions , any change to the conditions will set them off.. and you said they work couple of times and then they dont , it means that the conditions are not met, so this means that Self.animate5 is no longer = 4, if thats true it wont be able to spawn or destroy itself. give more info if possible , does self.animate change alot ? does it reset ? what happens to game.animate does it change to 4 and remain as 4, does it change ? does it reset ?
You want to spawn again but your destroying yourself after 0.1 seconds , so i dont really understand what your trying to do.. are you respawning this actor that will spawn another actor and then destroy itself and do that over and over again ?
I highly recommend going to my guru YouTube and watch my GSlogic series.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
thanks everyone. I just gave up with a number 3, since as you said it deletes itself.
Thanks a lot for your answer. I just decided to leave it with a number 3.