@Wulf ,
OnPlayerInput hook can't cancel the Player Input? Just reads it?
Solved OnPlayerInput cancel Input?
Discussion in 'Hurtworld Development' started by SouZa, May 4, 2016.
-
Wulf Community Admin
Correct, there's no return behavior right now.
-
ok : (
Solved. -
Wulf Community Admin
-
It's ok.
I just wanted to cancel player movement and later activate again.
I managed to do it by doing WorldPlayerEntity.SetActive(false|true) for now.
Edit: I just remember I could, on the Hook, put the movement input to false and update the InputControls from CharacterMotorSimple also, lol. -
Wulf Community Admin
-
@Wulf sorry again, I managed to cancel player movement by changing the input to false on the hook. But i can't cancel player attack (like shoot bow and swing spear). Tried all inputs to false. You know something about it?
-
Wulf Community Admin
-
Why not just use CharacterMotorSimple.CanMove = false;
Would be more efficient than returning false on every input.
Also, you could use FireServer.ShotPower(0f); (float value of zero) to make bullets do no damage.
Or you could just unequipt them, or remove their bullets and give them back when you allow them to shoot, or give them godmode and turn it off when wanted.Last edited by a moderator: May 10, 2016