Different Actors enters different reigons. Need help with simplify event

ilyart

  • Posts: 1
Good day! Need small help with regions. How to simplify the event...

After read this article - http://www.stencyl.com/help/view/regions/  i make few actors with events like this (game like puzzle):

when Actor 1 enters region 1 - OK action.
when Actor 1 enters region 2 ERROR action.
when Actor 2 enters region 1 - ERROR.
when Actor 2 enters region 2 - OK.
...

This work good, but a lot of code :(

Maybe simplify this code to view like this?   

IF Actor 1 enters Region 1 - OK
ELSE if Actor 1 enters other regions - ERROR

I tried to write this event but not working.

dtrungle

  • Posts: 1938
Use the [if self is inside region] block.

You will have to figure out where the region and actor values will come from though. They could be created in the behavior itself or obtained through get/set.