Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Blade on Sun 26/12/2004 12:13:37

Title: Object on [SOLVED]
Post by: Blade on Sun 26/12/2004 12:13:37
I'm having problem with turning an object on. It's a map location that turns after a dialog takes place. I've made a global variable, imported it to the rooms script and made a function

// room script file
import int crimsc;
function Objec() {
  if (crimsc == 1) {
  ObjectOn(5);
  }
}

In the character interaction I set the var to 1. Still the object won't turn on.
And I realise my method may look weird to you but since I'm not too good at scripting I had to improvise.
Title: Re: Object on
Post by: Radiant on Sun 26/12/2004 14:32:48
Are you calling the function Objec() ever? A more logical place to put this would either be in the enter_room script, or in repeatedly_execute.
Title: Re: Object on
Post by: Blade on Sun 26/12/2004 17:47:59
Thanks, I just made an if statement in enter room and it worked.