I've been working on the art for my game for a while and have just started actually assembling it. I want to work within the scripting to have more control, but the newbie learning curve is hurting.
I've written the following in the code in the room script editor
// room script file
SetObjectGraphic (0, 68);
SetObjectPosition (0, 100, 100);
objecton (0)
SetObjectView (0, 6);
AnimateObject (0, 0, 5, 2);
This is a chandelier object which will eventually fall. It is animated for the flames. However, the script simply doesn't work. I know it's probably something very simple.
The only other way I know how to work with objects is through the AGS tools... but I need the object always animating, not after an interaction.
Hope this isn't insultingly simple. Thanks.
It always is something simple ;)
'objecton (0)' should be ObjectOn (0);
Fixed that, and still receive same error as before...
Error (Line 3) Parse Error: Unexpected 'SetObjectGraphic'
What, even more fundamentally incorrect, am I doing?
Ah I see, you have to put the code in a function, not just at the top of the script. Go onto interactions, choose the appropriate interaction (like 'Player enters screen') and choose Run Script. Put the code in there. You can create variables outside functions in the rooms script so they can be accessed by all the functions, but you need to put the rest of your scripting into the interaction functions.
Working now. Thanks. Going to take a lot to get used to this scripting with a non-programming background.