Stop the characters movement

Started by jamesreg, Wed 15/07/2009 16:52:02

Previous topic - Next topic

jamesreg

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

Vukul

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:
Code: ags

function room_AfterFadeIn()
{
RemoveWalkableArea (1);
}

Maybe, add some if condition to check whether player is able to move the character.
  

Akatosh

RemoveWalkableArea(1);

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

/EDIt: $%*# ninjas.

Ghost

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.

jamesreg


GuyAwesome

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.

SMF spam blocked by CleanTalk