i am makin this thing where an object moves toward the playable char, and i have a button that makes the char duck, how would i script it so ta if the char hits the button, he lives,and if he doesnt, he dies???
You could just use an int:
int buttonpressed;
int egodead;
if ((AreCharObjColliding(EGO, 5) == 1) && (buttonpressed == 0)) { // if the object is colliding with the character and if the player has not pressed the button...
egodead = 1; // ...the character dies...
}
else {
egodead = 0; // ...otherwise, he lives
}
------EDIT------
You could also download 2ma2's platform game if you want to make script which tells you WHERE the object hits the character.