Hi,
Hopefully this will be my last tech question for a little while, cause I'm doing a final test run.
But... I tested my game from within the AGS editor by changing the start location of the playable character and changing some global vars and everything worked fine.
Now I made an .exe (F7) and suddenly some of the facelocation and facecharacter commands are failing.
'Characters turn to face direction' is set to false. I don't know exactly what that does, but in most cases the playable character correctly turns to the specified coordinates. But not always.
Example:
cChpaltr.Say("something");
Wait(10);
cMika.FaceLocation(330, cMika.y,eBlock);
//cMika.FaceCharacter(cChpaltr, eBlock);
Wait(10);
cChpaltr.Say("something");
Wait(20);
cLarry.Walk(158, 78, eBlock, eAnywhere);
cLarry.Walk(158, 80, eBlock, eAnywhere);
Wait(20);
cLarry.SayAt(70, 5, 80, "something");
Wait(10);
cMika.FaceCharacter(cLarry);
//cMika.FaceLocation(cMika.x, 0);
Wait(10);
etc
I put in the wait commands to see if that changed anything, but it didn't.
Here cMika does NOT face cChpaltr (=look to the right).
She does face cLarry, but much later in the sequence.
And after that she immediately faces back again, while there no scripted command to do so.
Most similar scripts don't give this problem but a few do.
Is this something with blocking statements?
thanks
'Characters turn to face direction' means that a character who's facing left and told to face right will visibly turn i.e. face down, then right instead of instantly facing right.
As a workaround for your problem: if you know the direction, just change the character's loop directly:
cMika.Loop = 2; // face right
As for solving it: if you want her to face right, try those:
cMika.FaceLocation(cMika.x +1, cMika.y, eBlock);
cMika.FaceLocation(cMika.x + 1000, cMika.y, eBlock);
Walkable areas might also factor into this (facing only works if the character can walk in the direction).
I tried cMika.Loop = 2; but she still doesn't turn her head.
Then I noticed she is indeed not standing on a walkable area, so I created one, but she still won't move.
She does turn her head to Larry though, but much later than instructed. And then she turns back without instruction.
Anything left that I can try?