[iOS] Strange collisions with groups if an actor of that type not in scene

Future Freak

  • Posts: 413
To prefix this issue - everything works perfectly in Flash.

I have a game where you need to get to the finish, collect stars and avoid enemies.
I have a HomeZone actor (win group), enemies and stars(collectables) to collect.

To detect the death of my player actor (set a dead flag to true), I have a collision text for self hits a member of Enemies
To complete a level (hit homezone)  I have a collision test for self hits member of Win

With stars, enemies and homezone on the scene - everything works as expected.
With Homezone and enemies, NO stars  - everything works as expected
With stars and homezone - but NO enemies - the death collision is triggered when the player hits a tile
With homezone only - the death collision is triggered when the player hits a tile
With enemies but No stars and No Win/Homezone - the Win collision is triggered when the player hits a tile

So I figured I need to have at least one actor of type enemy and one actor of type Win on screen for the collision detections to work properly.  Not a great problem, now that I know this, as this will mostly be the case for all levels in my game - however it does point to a possible bug in the iOS code somewhere.

I can provide my project to any Stencyl staff if they wish to look into this issue.


  • *
  • Posts: 17529
Yeah, seeing the project would be useful. Interesting observation nonetheless.


  • Posts: 53
I am having a similar issue, and are also happy to share the project with developers if it is a bug.


  • *
  • Posts: 467
Put it up on stencylforge so we can take a look.
Visit Reddit's Stencyl page and contribute to spread the word about this amazing program!


  • *
  • Posts: 236
I've run into the same bug (?) in iOS [Stencylworks 1.4.1 b143]

Similar setup (collectibles for points, villain actors for death, exit actor + region for "win")

During scene transition after win situation, "when this collides" is triggered for all villain actors.

There are multiple villain actors of the same type. When player hits one, the effect (aka what is done inside the when collides block) is applied to all actors of the same type. It is a smal fight animation. Every enemy sprite changes to "fight animation".

In flash there was no problem.
For now I've overcome the problem by "moving" the code from the villain actors' when collides block, to the main player under a "if first/if second actor of collision". That seems to be working ok.


  • Posts: 29
Did anyone find a solution for this problem? I have a similar problem with my game, described in this thread:


Upon collision with the ground, my character dies, and no moving of code blocks that I've thought to try has fixed anything.  Thanks!

I attached a pdf describing my problem- I made it for a friend who does iOS programming but not with stencyl, so ignore the first section. :)