Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: TheMagician on Thu 19/06/2003 16:29:56

Title: SetGlobalInt (character[EGO].activeinv,-1); does not work
Post by: TheMagician on Thu 19/06/2003 16:29:56
Hi,

I have a line of code in my global script in the "interface"-function:

SetGlobalInt (character[EGO].activeinv,-1);


I need the Active Inventory to be set to "0" as soon as the player clicks on the Inventory-menu button.

AGS does not crash while converting the script, so I think it's coded properly. However - in game - it seems to be ignored.

Any suggestions, please?
Title: Re:SetGlobalInt (character[EGO].activeinv,-1); does not work
Post by: scotch on Thu 19/06/2003 16:36:04
just do

character[EGO].activeinv=-1;

that's not a global int :)  Global ints just have numbers.
Title: Re:SetGlobalInt (character[EGO].activeinv,-1); does not work
Post by: TheMagician on Thu 19/06/2003 16:44:23
I LOOOOOVE this forum!

An answer in 5 minutes ... tried it ... and everything works perfect!

Thank you, scotch

Hurra!