Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Adrian on Fri 09/07/2010 10:55:19

Title: AdjustSpeedWithScaling only in one room
Post by: Adrian on Fri 09/07/2010 10:55:19
Hi everyone!

Is it possible to change the walking speed of characters depending on scaling in only one room instead of globaly all rooms? I couldn't find any script commands.

Thanks!
Title: Re: AdjustSpeedWithScaling only in one room
Post by: Crimson Wizard on Fri 09/07/2010 10:56:22
Change it when room loads and change back when character leaves the room?
Title: Re: AdjustSpeedWithScaling only in one room
Post by: Dualnames on Fri 09/07/2010 10:59:24
Quote from: Adrian on Fri 09/07/2010 10:55:19
Hi everyone!

Is it possible to change the walking speed of characters depending on scaling in only one room instead of globaly all rooms? I couldn't find any script commands.

Thanks!

it is possible to change the walking speed.
Let's say the room you want is room number 64.

Global Script/Some Module


function on_event(EventType event, int data) {
if (event==eEventBeforeFadeIn) {
   cEgo.ScaleMoveSpeed = false;//normally walking speed doesn't depend on scaling
   if (data==64) {
       cEgo.ScaleMoveSpeed = true;//on room 64 it depends on scaling
   }
}
}
Title: Re: AdjustSpeedWithScaling only in one room
Post by: Adrian on Fri 09/07/2010 11:13:08
Great, that's it! Sometimes I'm just too stupid to find a simple script command.
Thanks to both of you!!!