Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: AndersM on Fri 22/10/2004 19:34:23

Title: if-script problem
Post by: AndersM on Fri 22/10/2004 19:34:23
I think this should work, but it does not...

// script for object1: Interact object
if (CharacterView == 26) {
  ChangeCharacterView(28);
}
else {
  ChangeCharacterView(13);
}

Am I totaly lost, or am I on the right track?
Title: Re: if-script problem
Post by: Ashen on Fri 22/10/2004 19:37:26
Off the top of my head - you haven't said which character.
The usage is ChangeCharacterView (CHARID, int newview).

E.G.

if (character[EGO].view == 25) { // character view-1
  ChangeCharacterView(EGO, 28);
}
else {
  ChangeCharacterView (EGO, 13):
}