look down at my last two comments in this thread to see my problem...
1. Just use something like:
cEgo.FaceLocation(cEgo.x+5, cEgo.y); //Face right
cEgo.FaceLocation(cEgo.x-5, cEgo.y); //Face left
cEgo.FaceLocation(cEgo.x, cEgo.y-5); //Face up
cEgo.FaceLocation(cEgo.x, cEgo.y+5); //Face down
If you still think it's annoying to write these 'coordinates', you can define functions like:
function FaceRight(Character* ccc){
ccc.FaceLocation(ccc.x+5, ccc.y);
}
2. Just... look for Character.FaceCharacter() and Character.FaceObject() from the manual...
edit: heh now that it's solved that makes me like an idiot. :=
Thanks anyway for I like your idea of defining that function. But I just got another problem.
Example: My character wants to open a door. This is supposed to happen (in that order):
1. He walks to the door
2. He looks at the door
3. He faces that character
4. who says "Sorry, you can't go in there."
If I do that in the door's hotspot interaction-section the order is wrong. First the person says the sentence and THEN he looks at that door and the person. If I use the wait function the game pauses after these actions.
So what do I have to do to keep the actions in the right order?
Ok the first interaction is that script:
character[EGO].FaceLocation(character[EGO].y - 50, character[EGO].x);
Wait(40);
cEgo.FaceCharacter(cAnna);
Wait(40);
The second is the message by that person to the left.
But it's the other way around..