Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Grab and disabledefmovement (https://forums.graalonline.com/forums/showthread.php?t=59577)

ToNy_W 06-22-2005 11:59 PM

Grab and disabledefmovement
 
well i was just trying to make a npc that disables the player's movements when he grabs it but i got a problem, i figured out that when a player grabs something and is still pressing "a" when the movements get disabled, the player won't be able to move when the movements are enabled again, it will be like the player was still grabbing a wall, if you press the key to walk behinds it will begin to pull, though you're not pushing any keys...So is there a way i can fix the problem?

RefinoheaT 06-23-2005 05:52 PM

I could fix it, but I don't know how to make somthing happen when someone grabs the NPC. If you post how you made that, I can add the way to make it only happen once.

-Refino

Edit: Oh, I was just gonna do it like, when he grabs the first time, this.grab=true, and then when enablemovements is set, this.grab-false;

xAndrewx 06-23-2005 06:26 PM

if (!strequals(#m,grab)){ //I think #m is grab?
enabledefmovement;
}

Use a triggeraction, Refino.

Starfire2001 09-13-2013 09:49 PM

Sorry to bump a thread from 2005, but just ran into the same problem. If you disabledefmovment() when a player grabs a chest or something and then enabledefmovement() after, they will be stuck grabbing and unable to move until they press A again. Anyone got a solution for this?

fowlplay4 09-13-2013 10:18 PM

use freezeplayer() instead.


All times are GMT +2. The time now is 08:47 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.