![]() |
Custom Movement Issue
Just wondering, I have made my own custom movement script but the odd thing is, when you touch warps it simply walks over them and doesn't warp you to the new level.
And by warps I mean like level warps eg from outside to an inside level. If I use up, down, left or right keys it works, but I want it to work on WASD. |
Perhaps you should post your code?
|
I believe that's an issue with default events being invoked or not. I bet your onPlayerTouchsMe() events are not working either, are they? You should use keydown() and stick with the default keys. Let players choose what they use to move around.
|
I don't believe holding a key is required to traverse a warp link, or possibly to invoke onPlayerTouchsMe() as well.
Is this movement definitely relative to the players body coordinates and dimensions? It would have to be a box of {player.x + 0.5, player.y + 1, 2, 2} to work correctly. |
Modified my code a little bit and it now works.
Thanks anyway. |
Quote:
|
Disabledefmovement still allows you to traverse links, freeze player doesn't. He was probably using freezeplayer for some reason.
|
Quote:
|
I was not usin freeze player. I called disabledefmovement();
Why would anyone use freezeplayer in these circumstances :P |
I dunno, you're kind of dumb..
|
Quote:
|
Quote:
And the fix was just by using this. function onKeyPressed(code, key){ instead of function GraalControl.onKeyDown(code, key){ |
All times are GMT +2. The time now is 11:39 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.