Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Slasher on Mon 15/10/2012 16:25:37

Title: SOLVED: Disable Hotspot in global
Post by: Slasher on Mon 15/10/2012 16:25:37
I'm trying to disable a hotspot in the global after an event. I have tried giving the hotspot a name but to no avail, global will not accept. It is used if the player uses an inventory item in a certain room.

There may be another way (room rep exec if player has inventory then hotspot disabled perhaps?)

can you help

Title: Re: Disable Hotspot in global
Post by: Khris on Mon 15/10/2012 16:35:32
In a global context, use the hotspot[] array

Code (ags) Select
    if (player.Room == 4) hotspot[2].Enabled = false;
Title: Re: Disable Hotspot in global
Post by: Slasher on Mon 15/10/2012 16:47:17
So

Code (AGS) Select
else if(cELF.ActiveInventory==icarpet && cELF.Room==27 && bottle==true) hotspot[2].Enabled = false;

would do the trick then.

cheers Khris