Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Afflict on Thu 02/03/2006 20:42:11

Title: Character views (SOLVED)
Post by: Afflict on Thu 02/03/2006 20:42:11
OK well I am just annoying today I guess because well scripting is confusing me...

Heres my new problem my player chracters change views!

What happens is cEco talks to cDevil and then player character must change over to cDevil... Well then
his view changes from view2 to view 1 he looks like cEgo.

#sectionstart dialog_request  // DO NOT EDIT OR REMOVE THIS LINE
function dialog_request (int xvalue)  {
  if (xvalue == 1) {
cDevil.SetAsPlayer();  //sets devil as the playable character
}
Title: Re: Character views!
Post by: strazer on Thu 02/03/2006 21:14:30
Can you clarify what's going wrong? When does his view change? When walking? When talking? Do you change the player character's views somewhere?

Also, is that your entire dialog_request function? Because there's a brace missing or misplaced:


#sectionstart dialog_request  // DO NOT EDIT OR REMOVE THIS LINE
function dialog_request (int xvalue)  {
  if (xvalue == 1) {
    cDevil.SetAsPlayer();  //sets devil as the playable character
  } // this brace closes the if-clause
} // <- this brace closes the function
Title: Re: Character views!
Post by: Afflict on Thu 02/03/2006 21:17:08
O sorry I missed the last bracket when copying, its there though.

The characters view changes as soon as it switches to the player character.
Title: Re: Character views!
Post by: GarageGothic on Thu 02/03/2006 22:31:53
You're not forcing the player.View to 1 somewhere else in the code and have just forgotten about it?
Title: Re: Character views!
Post by: Afflict on Thu 02/03/2006 22:34:46
mmm I just realised that its in the room code! Player character view in the room options!!!

Thank you guys!