Is there a If player is not command

Started by mport2004, Sat 08/10/2005 23:13:43

Previous topic - Next topic

mport2004

I was wondering if there was a command thats the opposite of the command. if (player.ID == CSR) {SetGlobalInt(11,1);}
Or in other words I need my game to change the variable to 11,0 if the player character is not CSR.

Babar

The ultimate Professional Amateur

Now, with his very own game: Alien Time Zone


Ashen

For future reference, a list of operators supported in AGS is in the Manual.
I know what you're thinking ... Don't think that.

monkey0506

Or, you could do this:

Code: ags
if (player == cCsr) SetGlobalInt(11, 1);
else SetGlobalInt(11, 0);


Seeing as you said you wanted global-int 11 to be 1 if the player was CSR, I put that code, with the code to make it 0 if the player isn't CSR (via the else statement).

SMF spam blocked by CleanTalk