Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Mon 13/12/2004 21:26:16

Title: SetAreaScaling [SOLVED]
Post by: on Mon 13/12/2004 21:26:16
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.
Title: Re: SetAreaScaling
Post by: strazer on Mon 13/12/2004 21:35:49
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.
Title: Re: SetAreaScaling
Post by: on Mon 13/12/2004 21:51:56
Thanks for your help!