Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Neutron on Fri 01/04/2005 11:39:39

Title: problem with SetObjectView
Post by: Neutron on Fri 01/04/2005 11:39:39
i want to have an object that plays an animation of smoke, so i make a view with the appropriate frames, then i make an object, give it an image, put it where it needs to go, then i press the 'edit script' button in the settings window, and enter: SetObjectView(0,3); onto line 2, save, and exit.  then, i go to save the room, and it tells me there is an error with SetObjectView, and do i want to fix it.  admittedly, i haven't attempted room scripting, or anything other than making dialogues, but, it seemed pretty straightforward.  Does anyone know where I went astray? I realize i can set the view through the interaction options, or make the smoke part of an animated background, but I am just curious as to where I went wrong with the room editing.
Title: Re: problem with SetObjectView
Post by: Gilbert on Fri 01/04/2005 11:49:37
What's the exact error message?

Where did you put the line of script? Did you just edit the room script and just put it outside of a function? (which shouldn't work)
You shall put it into a function, like eg.
in the interaction editor, set the interaction for the event "Player enters screen before fade-in" to "run script", then press "edit script" and put the line there.
Title: Re: problem with SetObjectView
Post by: Neutron on Fri 01/04/2005 11:56:36
oh, ok.  i think i understand now.  i'll try it again.  thanks for your help.