ChangeParent

From Game Editor

Jump to: navigation, search
  • ChangeParent:

Change an Actor's parent.

int ChangeParent(char *actorName, char *parentName)

  • actorName:

- "Event Actor": Actor that is receiving the current event.

- "Parent Actor": Event Actor's parent, if exists.

- "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 in game.


  • parentName:

Any Actor name (including "Event Actor", "Collide Actor", "Parent Actor", "Creator Actor" and "no parent").


  • ex:

// Changing enemy_1's parent to boss_1 upon collision with door // Script Editor: player -> Collision (Any side of door)

ChangeParent("enemy_s", "boss_1");