I've just begun using AGS and I would like to simply make my character sprite scale in relation to his position on the screen. I go to the room editor and then proceed to settings>edit script. I input:
#sectionstart room_properties
SetAreaScaling(1,120,200)
#sectionend room_properties
When the program tries to compile I get the error "unexpected SetAreaScaling"
Could someone tell me what I'm doing wrong. Sorry if this is a dumb question.
You first have to create the functions that will contain your code with the Interaction Editor (the "i" button). Add a "Run Script" action for "Player enter screen (before fadein)" for example and click the "Edit script..." button. You can't create the built-in functions yourself. The "{}" button is for quickly editing the code afterwards.
But you can set a walkable area's scaling directly in the room editor. Select your walkable area in the "Areas" section, check "Use continous scaling" and enter the appropriate values.
Thanks for your help!