Undefined Token 'SetPlayerCharacter' - SOLVED

Started by Danruto, Fri 29/02/2008 16:34:29

Previous topic - Next topic

Danruto

Hi there,

I'm very new to AGS and am using it to learn base scripting. I've been trying to use the 'SetPlayerCharacter' command to allow a switch between two onscreen chars I have got after choosing to interact with a hotspot. The room code is as follows:

function hPrestswitch_Interact()
{
SetPlayerCharacter() (cChan.SetAsPlayer()
}

function hChanswitch_Interact()
{
SetPlayerCharacter() (cPrest.SetAsPlayer()
}

However wen trying to run the game and error occurs stating: 'Undefined token 'SetPlayerCharacter'

I understand this is more than likely a simple issue pertaining to my complete lack of experience with coding, if someone could point me in the right direction I would really appreciate it.

I have searched the forums and read the BFAQ but get the feeling I'm missing something very straight forward.

Thank you for your time.

Akatosh

Yes you are. Actually, it would just be

Code: ags

cChan.SetAsPlayer();


and

Code: ags

cPrest.SetAsPlayer();


respectively. I'm pretty sure it's explained in the manual, though. Also, welcome to the forums!  ;)

Danruto

#2
I serached the manual for SetPlayerCharacter (referenced in the BFAQ) not SetAsPlayer, this is where I got lost I guess.

anyway..

Awesome THX!!!!!

SMF spam blocked by CleanTalk