Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: jamesreg on Wed 15/07/2009 16:52:02

Title: Stop the characters movement
Post by: jamesreg on Wed 15/07/2009 16:52:02
I know this is probably listed somewhere but having trouble finding it and the commands I think do it don't work

If I am doing a scene where I have a character appear on screen via an animation sequence then I do not want the
player to be able to move the character I just want him frozen on screen but i still want you to be able to move the mouse and do other things on the screen how do i do this

I know this is simple as pie just not for me lol
Title: Re: Stop the characters movement
Post by: Vukul on Wed 15/07/2009 17:00:01
Well, for example, you could just not make any Walkable area there.

Or: If you want the character to move in the room afterwards, just put code like this:

function room_AfterFadeIn()
{
RemoveWalkableArea (1);
}

Maybe, add some if condition to check whether player is able to move the character.
Title: Re: Stop the characters movement
Post by: Akatosh on Wed 15/07/2009 17:00:23
RemoveWalkableArea(1);

Replace 1 with the number of the walkable area you want to remove, and you're golden.

/EDIt: $%*# ninjas.
Title: Re: Stop the characters movement
Post by: on Wed 15/07/2009 17:10:06
Or, another small trick, place a REGION and add a player.StopMoving() to it's "walks onto region" function.

The effect is the same as in vukul/akatosh's tip, but regions can overlap walkable areas and can be turned on/off. Sometime's that's quite handy.
Title: Re: Stop the characters movement
Post by: jamesreg on Wed 15/07/2009 17:13:16
Thanks guys your a big help
Title: Re: Stop the characters movement
Post by: GuyAwesome on Fri 17/07/2009 15:42:44
Couldn't you just disable Walk mode for that scene? (mouse.DisableMode(eModeWalkTo);)
I don't know how it'd work with, for example, Hotspot walkto points - I think they'd still make the player walk, unfortunately - but it seems a little less ... workaround-ish than turning off the walkable area under the player.