![]() |
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?
|
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; |
if (!strequals(#m,grab)){ //I think #m is grab?
enabledefmovement; } Use a triggeraction, Refino. |
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?
|
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.