Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Jojowl80 on Tue 26/05/2020 23:15:20

Title: trying to make an object appear when "pushed"
Post by: Jojowl80 on Tue 26/05/2020 23:15:20
hey! I would like to turn a TV on when "pushed" to put an object in place. the object is set at false the object ID is 0

//script

function hTelevision_AnyClick() {
  if(Verbs.UsedAction(eGA_WalkTo)) {

}
  else if(Verbs.UsedAction(eGA_Push)) {
    player.Say("Okay.");
  Object[0].Visible=true
}
}

error: fixed size array cannot be used in this way

Im very new to scripting any help would be appreciated!
Title: Re: trying to make an object appear when "pushed"
Post by: Crimson Wizard on Tue 26/05/2020 23:24:35
It's "object" with small "o", Object is a name of a type, object is an array of Objects.
Title: Re: trying to make an object appear when "pushed"
Post by: Jojowl80 on Tue 26/05/2020 23:28:49
worked. thank you so much for the super quick reply!