I need that my character Y position is constantly added a fixed quantity as long as character remains inside a region.
I tried with this:
function region1_Standing() {
//if (!raised) {
cEgo.y -= 10;
raised = true;
//} else {
// already raised
//}
}
If lines are commented, character flickers between "normal" and raised position.
If they are not commented, character Y position is changed only at the beginning, then turns back to the one calculated by pathfinder.
This is a perfect use case for the .z property; use that instead. Unless that needs to happen in a blocking context, use the region's "walks onto" event to set .z to 10, and the "walks off" event to reset .z back to 0.
Thanks! :)