From Game Editor
Revision as of 00:02, 11 May 2011 by Skydereign (Talk | contribs)
int ToAnteriorPosition(char *actorName, char *animationName, int state);
This sets the position of an actor to its position in the previous frame. So, it sets actorName's (x,y) equal to its (xprevious, yprevious). Returns 1 if success, else 0.
ToAnteriorPosition Input
actorName
- "Event Actor": Actor that is receiving the current event.
- "Parent Actor": Event Actor's parent, if actor has a parent.
- "Creator Actor": Event Actor's creator, if Event Actor has been created in some "Create Actor" action.
- "Collide Actor": Actor that collided with the event Actor.
- Any Actor name or clonename in the game.
Example:
Prevent a player from passing through a wall on collision without using PhysicalResponse.
player -> Collision with wall (repeat disabled) -> Script Editor
ToAnteriorPosition("Event Actor");