Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: AnInhumer on Mon 28/02/2005 20:30:04

Title: ObjectOn in different room
Post by: AnInhumer on Mon 28/02/2005 20:30:04
How can you turn on an object in a different room.
I think this is probably a thingy.thingy that I don't understand, tips on these would be helpful
Title: Re: ObjectOn in different room
Post by: strazer on Mon 28/02/2005 21:21:48
You can't do it directly by default.

What you can do is set a GlobalInt to 1, and in the room's "Player enters screen (before fadein)" interaction, check if the GlobalInt is 1, then turn the object on.


  // script for interaction that should turn the object on
  SetGlobalInt(28, 1);



  // script for room: Player enters screen (before fadein)

  if (GetGlobalInt(28) == 1) ObjectOn(THEOBJECTNUMBER);


There's also the OtherRoom script module (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=20650) or plugin (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=14203).

Is this in the BFAQ?
Title: Re: ObjectOn in different room
Post by: AnInhumer on Tue 01/03/2005 16:13:31
Er... thanks I think.