Bug Issue: When a region is spawned on top of an actor, the actor is not considered inside


Pages: 1

SirCrocketz

  • Subscriber - Stencyl Studio
  • *
March 25, 2017, 02:33:17 pm
When a region is created on top of an actor, the actor is not considered to be "inside" the region. If a "For each actor inside region" block is used, it does nothing. Currently to circumvent this I'm creating a region at 0,0 then resizing and moving the region to my desired size and location.


Issue updated by rob1221 - March 28, 2017, 07:35:08 am
  • Category changed from Behavior Settings to Engine


rob1221

  • Master Stencyler
  • *
April 27, 2017, 08:57:38 am
I'm testing this in Flash with a region created after 1 second and can't reproduce the problem.  If this is still happening, could you provide more details or a sample game?
  • Status changed from New to Need Info


New attachment added by SirCrocketz - April 28, 2017, 08:55:33 am


New attachment added by SirCrocketz - April 28, 2017, 08:55:46 am


New attachment added by SirCrocketz - April 28, 2017, 08:57:15 am


New attachment added by SirCrocketz - April 28, 2017, 08:57:18 am


New attachment added by SirCrocketz - April 28, 2017, 08:57:42 am


SirCrocketz

  • Subscriber - Stencyl Studio
  • *
April 28, 2017, 08:59:57 am
I tried creating a sample game and I couldn't recreate the issue. So I attached images of my code in question and some videos of how they're working. If I create the region on the "Created" event, the When Actor of Group Enters Region event works fine. Since I'm creating the region in a custom event, it doesn't work properly, hence the workaround.


New attachment added by SirCrocketz - April 28, 2017, 09:03:20 am


SirCrocketz

  • Subscriber - Stencyl Studio
  • *
April 28, 2017, 09:03:37 am
Figured out how to recreate the issue, attached a sample game.


rob1221

  • Master Stencyler
  • *
April 28, 2017, 10:19:32 am
The region listener is added right after "when created", and if your region doesn't exist at that time, then the listener won't work.  For regions created after "when created" you should use the boolean block instead.
« Last Edit: April 28, 2017, 10:20:38 am by rob1221 »


SirCrocketz

  • Subscriber - Stencyl Studio
  • *
April 28, 2017, 10:23:09 am
Ok that makes sense and was my instinct after recreating the issue. Is there another way around this other than moving and resizing the region or should I just stick with doing that? It's more a QoL or best usage issue than anything else.


rob1221

  • Master Stencyler
  • *
April 28, 2017, 10:37:16 am
With the null region issue resolved, do you still have the problem you mentioned in the first post regarding the "for each actor inside region" block?


New attachment added by SirCrocketz - April 28, 2017, 10:57:04 am


SirCrocketz

  • Subscriber - Stencyl Studio
  • *
April 28, 2017, 10:58:10 am
Still seem to be getting the issue I originally mentioned. Attached another sample game. If this block works the same way as the event then that would be the problem.


rob1221

  • Master Stencyler
  • *
April 28, 2017, 11:21:19 am
EDIT: I think I opened the first project again.  Hold on.
« Last Edit: April 28, 2017, 11:24:53 am by rob1221 »


rob1221

  • Master Stencyler
  • *
April 28, 2017, 11:44:56 am
It looks like Stencyl needs to advance one step/update for the actor to be added to the region list.  So you can't detect the actor immediately, but after the next loop of the "always" event (10ms later) the actor is detected.

EDIT: The problem is similar to this issue as well: http://community.stencyl.com/index.php?issue=299.0
  • Status changed from Need Info to Confirmed
« Last Edit: April 28, 2017, 12:22:10 pm by rob1221 »


Pages: 1

Details

  • Reported
    March 25, 2017, 02:33:17 pm
  • Updated
    April 28, 2017, 11:44:56 am

  • View Status
    Public
  • Type
    Bug
  • Status
    Confirmed
  • Priority
    Normal
  • Version
    Stencyl 3.4
  • Fixed in
    (none)
  • Assigned to
    (none)
  • Category
    Engine

Tags


Attachments


* Splash Damage Broken.png (40.61 kB, 853x947 - viewed 38 times.)

* Splash Damage.png (46.78 kB, 745x1104 - viewed 54 times.)
* Splash Damage Broken.mov (5126.64 kB - downloaded 15 times.)
* Splash Damage Broken.mov (5126.64 kB - downloaded 16 times.)
* Splash Damage.mov (5663.19 kB - downloaded 15 times.)
* Region Issue.stencyl (639.22 kB - downloaded 17 times.)
* Region Issue.stencyl (641.36 kB - downloaded 18 times.)