Weird reaction to "Region has value"

Luyren

  • *
  • Posts: 2707
Another strange bug. At least I think it's a bug. I've build a test game for this, it's called "Test Game", and it's on Forge. A heads up, the bottom most rectangle on the "bug2" screenshot is a terrain region.

The behavior that reproduce this problem is Test Region (attached). I've configured two actors, "asdasd" (the hero from dungeon dash) and "Test" (a random scribble). "asdasd" creates a region and makes the region follow him, but "Test" don't create regions, as you can see in "bug1".

And the problem is seen in "bug2". It's printing both actors name, when only the actor who created the region (and the region attribute has value) should be printing. Besides, it's "Test" who is setting the position of the region, and not "asdasd".

I have no idea how the "Test" actor got the value of the region in the first place!This bug first appeared on Abyss Souls (Keep Falling, for those of you who still remember). A monster that was set to be passive was aggressive, and then I noticed it was using a region (like an aggressive monster), even though it doesn't create one.

Windows 7
b368
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.
Twitter

Legendary Hoamaru

  • *
  • Posts: 1088
Can you upload to Forge? Nevermind. I wonder if uninitialized regions are being set to the last created by default.

Legendary Hoamaru

  • *
  • Posts: 1088
That seems to be what is happening.  I swear we've caught this one before.

Place a "Clear value of {variable}", using the region attribute, at the top of "when created" to fix this.

Luyren

  • *
  • Posts: 2707
Thank you very much!
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.
Twitter