"Mouse released" event fires two times on a region?

dripple

  • Posts: 747
I placed four regions on a scene and four events that fire when the mouse button is released on each region. Unfortunately, each event is fired exactly two times.

I assume, this is a bug?

For the moment, I am four transparent actors, but I would prefer the scene regions, as I do have plans for more interaction and transparent Actors are not easy to handle :)
Sure, my games won't get better with all the new features of Stencyl.
But I do have more fun creating bad ones.


MayazCastle Keeper

Tygerzin

  • Posts: 23
Confirmed.  Hopefully Jon or someone else will read this and update it.  Suppose I can message one of them if don't receive a response on the post.

The problem is regions are being added to the engine's list of regions twice.
Here is a fix...
1. Go to Engine.hx
2. Find the loadRegions function
3. Remove the following line of code
Code: [Select]
regions.set(r.ID, region);

The call to addRegion(region) also has a regions.set() in it.  So we just need to remove one of them.

dripple

  • Posts: 747
Thanks, Tygerzin

Can confirm that this fix solved the problem, thanx.

I keep my game using the transparent Actors for now, as I don't want to break it with an upcoming update that might not having the fix in it.
Sure, my games won't get better with all the new features of Stencyl.
But I do have more fun creating bad ones.


MayazCastle Keeper

SadiQ

  • Posts: 1795
The problem is regions are being added to the engine's list of regions twice.
`

That explains why I got duplicate names when I tried to put all the regions from a scene in a list.
The same also happens with terrain regions.
Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

rob1221

  • *
  • Posts: 9472
Fixed for regular and terrain regions.