Respawn doesn't work for certain actors after reloading Scene

adrianocapcom

  • Posts: 8
YEAH!!!

You are right, just by adding a do after .5 sec "unpause game" after the "fade out and reload" command, I am now able to get them respawning again and again every time the scene reloads. I did this on the already present Updated event directly on the scene (Screenshot 1)
I know that I could probably do it in a better way, but as you diagnosed the main problem seems to be exactly the Pause and this fix made it work. I would love to learn how to avoid the use of Updated as the much as I can!

I learned a lot with this and gained a bit of extra confidence in using Stencyl.
THANK YOU!

I am about to check your Custom Event video..starving to know more about optimizing my workflow, organizing my logic better and being able to increase the level of complexity of my sketches.

Last question I have about this is:
Why the score behavior (Screenshot 2) doesn't work when applied to a Scene Behavior, and works only when applied directly on the Scene Event page?
Is there a hierarchy that establish when it's better to write code on Scene/Actor behaviors (to attach) vs on Scene/Actor event page directly?

sdieters

  • Posts: 2068
the only difference is that you are able to set the value of attributes inside the behaviors tab (which you probably didnt, and so the code doesnt work). so instead of "hardcoding" the AdriCartridge and Score obs actor types, you can create attributes and (unless you hide them) set the values inside the behaviors tab, so you can use the same behavior for different purposes.

here are a couple of more tips:
1) "IF (ScoreCounting)" is exactly the same as if you would use "IF ((ScoreCounting) = (true))"
2) "IF (not(ScoreCounting))" is exactly the same as if you would use "IF ((ScoreCounting) = (false))"
3) try to use regions instead of Score obs actor types to manage your score.
My new profile is TheIndieStation.
When you see a recent post with this name, i'm probably using my phone. So dont mind any typo's =p

Minimo

  • Posts: 201
Just wondering:
how do you do the opposite ?

How do you make sure an enemy actor stays dead if killed by the player,, even if the player dies and the scene is reloaded ?
Currently, if the Player kills an enemy, it stays dead,,, unless the Player dies and the scene is reloaded...