Bentley
Member
Just a quick question:
I have AI (in a platformer) that sets its face variable like this:
Edit: targ_obj is the player and there's only 1 player.
face is set in the create event to 1. The idea is that "face" will be 1 or -1, right or left, and if their x's are equal, (the OR should work right?) the enemy faces where he was facing.
It's just a replacement for this
Curious where I'm misunderstanding. Thanks for reading.
I have AI (in a platformer) that sets its face variable like this:
Edit: targ_obj is the player and there's only 1 player.
Code:
face = sign(targ_obj.x - x) | face;
It's just a replacement for this
Code:
if (x != targ_obj.x)
{
face = sign(targ_obj.x - x);
}