2.2 to 3.0 behavior stoped

Risbo

  • Posts: 33
even if a had tons of problems i changed to 3.0 i fixed most problems but one just wont work please some experts on this!!!
i need this actor to die after the collision and create it self every 2 sec  in 2.2 it worked perfect now not i deleted it and wrote all again that was the expl on  stencylpedia but it dont work...tnx

Tuo

  • *
  • Posts: 2469
Okay, I do not know how that would have worked in 2.2 in the first place...

First of all, you cannot both kill and recycle an actor. It's one or the other (and "recycle" is no longer supported in 3.0 to my knowledge).
Second, any "do after" or "do every code" needs a check "if self is alive". Otherwise the entire game normally crashes. And, in this case, you are guaranteeing that the actor is dead, so the code will fail before it even begins.
The best thing you can probably do is to make a scene code instead. There's an event for an actor of type being created/killed. In that code, you can see if the actor has been killed (NOT recycled), and if so, wait 2 seconds and make a new one. Since it is a scene code instead, it is not dependent on the actor being alive.
Don't look to me but rather to the One who is the reason for what I do. :)

If you need help, send me a PM. Even if I haven't been on in the forums in ages, I still receive those messages via email notifications. You can also reply to any of my forum posts, regardless of the age (especially if I created it), and I will likely reply.

If you want to see the programming behind certain types of games, feel free to check out my "Demo-" games on StencylForge (http://community.stencyl.com/index.php/topic,16160.0.html)

Risbo

  • Posts: 33
Ok tnx for the tip and the advice.....im new in this alll and i learn all from scratch...and yes it works in 2.2 i got it on newgrounds.....but this 3.0 its killing me mann i throw my pc out of the window becos of stencyl 3.0.....i create now a simple game where click to die the main control is....i put 5 actors in the scene start it everything is fine and when i close it the actors are all messed up they are not in place... :-[ :-[ :-[ :-[ :-[ :-[ :-[  tnx