draw actor. And you can get rid of the second if by stating no change instead of forward
- Code: Select all
if (yvelocity>2 || yvelocity<-2)
{
ChangeAnimation("Event Actor", "jump", NO_CHANGE);
}
and just so you understand for future needs, you use collision free with the first variable being in quotes the name of the actor you are checking, then a comma and the x value, then a comma and the y value. That's sorta a weird way of explaining it though... the documentation says:
CollisionFree: Check if position (x, y) is collision free for ActorName. Return 1 if not collide, 0 otherwise.
int CollisionFree(char *actorName, int x, int y)
Actor name:
- "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.
Script Editor Syntax:
if (CollisionFree("Event Actor", x, y+5)) y=y+5; //On KeyDown Event script for KEY_DOWN, check if there is no collision before moving an actor down by 5 pixels.
it has all script references, in GE go to the top right of the task bar choose help -> documentation -> scripting -> scroll to the bottom and click script refrence
Working on a probably too ambitious project! Wild-west-adventure-RPG-shooter-thing.