Actors behave strange on respawn. Recycled? [NEED INFO]

Almakos

  • Posts: 632
I have some actors which spawn at given X,Y and when touched fly to 0,0 coordinates.
The problem is that if I spawn 10 actors and then touch them, they fly to 0,0 as expected, but if after that I spawn 10 or less again, they spawn at 0,0 coordinates instead of where I tell them to.
If I spawn more than 10, for example 15. then 10 will spawn at 0,0 and other 5 will spawn as expected.

Also some of my other actors don't reset some of their attributes on respawn.

« Last Edit: June 09, 2013, 12:16:14 am by Jon »
Fishing Fantasy Trailer


Almakos

  • Posts: 632
forgot to mention, that this bug appears only in Stencyl versions, which got "performance increased"
All after 19th of May have this issue.
Fishing Fantasy Trailer


twotimingpete

  • *
  • Posts: 1667
I've noticed in my own experiments with sort of testing the limits of how many particles or enemies I can spawn -- That, although the "recycle" block is gone in 3.0, it seems to decide to recycle things on its own given the right circumstance.

I know this because when I'm spawning mass enemies and killing them and spawning more, some would spawn with apply effects already on them (so you can deduce that I hit one, apply effect coloration was applied since that's what happens to indicate damage received, it died while the effect was on it, then it was recycled and respawned with the effect still on)

I've had this same thing happen with particle effects. I've made a habit of doing "remove all effects" and other house cleaning on such things in the when created event.

so, yeah, sounds like a recycling thing to me. You might add some redundancy to counter it, in other words, set the coordinates where you want them in the when creating event.

rob1221

  • *
  • Posts: 9472
Recycling is now the default, despite the kill block still being used.

Almakos

  • Posts: 632
but I do tell them where to spawn. the problem is that they spawn where previous of their kind died no matter of what...and this is happening with very recent Stencyl versions. I somehow don't see how I can force them to spawn where I want...Or I am missing something or this is a huge problem for my kind of game.

I've attached video examples with and without bug, recorded from two different versions of Stencyl (same game). please pay attention to those bouncy lights which fly out from the ship when fish is caught. in version with bug they sometimes are not spawned at the ship location, but where previous died instead.
Fishing Fantasy Trailer


Yeah i had the same problem using a tint actor when damage and remove effect after 0.2 seconds.Once the enemy died it re-spawned with the tint effect still on them as if they were hit. For some reason it did not do that in 2.2 maybe their should be a return to default status block. that once the enemy dies all effects are removed  regardless if you specify it or not. also i hope the team can make the effects in flash work on mobile.

Almakos

  • Posts: 632
yeah, I have been struggling to tint colours with colours for some time and haven't done that yet.
http://community.stencyl.com/index.php/topic,21925.msg127276.html#msg127276
But I do not give up and will try again later =)

As of this recycled thing, it started just recently, so I am using previous Stencyl builds (middle of may) to avoid those bugs.
Fishing Fantasy Trailer


Legendary Hoamaru

  • *
  • Posts: 1088
I'll look at both tomorrow after work, thanks!

Legendary Hoamaru

  • *
  • Posts: 1088
I need to see the behaviors related to the position bug, I can't reproduce it.  I can have it fixed tomorrow along with the effects bug.

Almakos

  • Posts: 632
Hi, I've sent you PM with a game link and here are some details where to look:
Attached are screenshots of behaviours when to spawn (SPAWN BONUS) and what will happen after actor is spawned (Bonus_behaviour)

to see the bug in action you will have to drop some lanterns (arrow down) and catch some fish with hook (arrow up).
Fishing Fantasy Trailer


Legendary Hoamaru

  • *
  • Posts: 1088
Thanks for the example, fixed.  Forgot I changed how tweens were canceled for recycling.

Almakos

  • Posts: 632
thank you, Mike! you saved me again )
I've checked it on both mac and iOS builds and positioning of recycled actors works perfectly well now :)
However, there seems to be a problem with fading tweens now (or it was there from the beginning)...

Some sparks re-spawn totally transparent.
I've attached video where you can see, that first 3 sparks are OK and in the next bunch there is one, which spawned transparent (one which flew to the right)

All those sparks have behaviour to fade out and die after created. So I believe newly created sparks still think they are transparent...

Anyway thank you. At least now I can proceed with that bonus score mechanics. Awesome :D

« Last Edit: June 13, 2013, 12:36:58 pm by Almakos »
Fishing Fantasy Trailer


Almakos

  • Posts: 632
just wanted to say, that this is not yet a fixed bug.
Fishing Fantasy Trailer