![]() |
Disableing Sword
What is the function to disable the sword in the default movement?
|
disableweapons();
|
Thank you
|
keep in mind that this will disable the use of onWeaponFired(). you will either need to trigger it your own or have your own functions name when triggering it on your own (same thing will be the result)
|
Quote:
When you mean it disables it, does that mean it just disables the "press 'D'" for the weaponFired? Because I have an inventory where if you double click it activates the weaponFired() function. Does that mean it won't work anymore? |
if you keep using disableWeapons() it wont. if you enable it again by using enableWeapons() then they will be triggered by default when you press D
|
Even with disableweapons(), using a custom triggered onWeaponFired() will work absolutely fine. It just disables the default ASD functionality.
|
Quote:
|
I have another question when it comes to the default movement. As we know, the direction keys on the keyboard make the player move up, left, down, and right. Is there a command to make the player move using the default movement?
For example: PHP Code:
I know it's a complex question kinda, hopefully someone can help! AND I would also like to add, disabledefmovement() will disable the whole movement system, is there a function to just disable the ability to move instead of disabling everything such as the sword, tile detection, etc? |
You can't just replace the keys for the default movement, you would have to force change the keys a player has been setting in the f3 menu (I would't suggest that at all).
And no you can't disable the movement only. You need to create your own movement including your own sword setup etc. You can use default stuff like the players speed, hearts, damage the sword currently does (I believe) and such. |
| All times are GMT +2. The time now is 10:07 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.