Preventing a player from moving but only allowing them to turn around

I want to create 2 modes for the player:
1- Movement (normal)
2- No movement, but can change direction.

This is a shooting game. I wanted every time the player presses 'ctrl' he switches between modes, and only in the no movement mode can the player shoot.
I tried to create an event when you press 'ctrl' that would make the player repeat an empty movement list to make him get stuck in place, and then using the movement buttons the character would change direction.
But it didn't really work, the player was stuck, and only by long pressing 'ctrl' could you change direction, but immediately after that you could move again.
See an example in the spoiler box.

If anyone knows how to create a situation where the player can only change direction without moving?

I know there is a plugin that allows changing direction before moving, but I prefer that the player has control over when to move freely and when to only change direction before shooting.

Spoiler
[/
ctrlmode.png
SPOILER]
You could use the setspeed script, setting the value to 0.
Code:
$gamePlayer.setMoveSpeed(0)

I would use a button common event:
Have a conditional to check if the key has been pressed. The first time it is pressed, run the script and also turn on a gameSwitch (let's call it 'isAiming')
Wrap the above step in another conditional checking the state if isAiming.
if ctrl is triggered:
If isAiming is off, setMoveSpeed to 0, turn on isAiming.
else (isAiming is On)
setMoveSpeed to 4, turn off isAiming.

*If you use a button Common Event plugin, the conditional to check the button press is not necessary. You would instead bind this common event to the button in the plugin's parameters.

Give that a try. I haven't tested it.
You could use the setspeed script, setting the value to 0.
Code:
$gamePlayer.setMoveSpeed(0)

I would use a button common event:
Have a conditional to check if the key has been pressed. The first time it is pressed, run the script and also turn on a gameSwitch (let's call it 'isAiming')
Wrap the above step in another conditional checking the state if isAiming.
if ctrl is triggered:
If isAiming is off, setMoveSpeed to 0, turn on isAiming.
else (isAiming is On)
setMoveSpeed to 4, turn off isAiming.

*If you use a button Common Event plugin, the conditional to check the button press is not necessary. You would instead bind this common event to the button in the plugin's parameters.

Give that a try. I haven't tested it.
Thanks
I'll try that
I'll try that
report back if it works at all, like I said, I hadn't tested it.

Interesting challenge! [spam]
Go away skinwalker. We see right through your facade. AI generated profile pic, and utterly useless AI generated response (which is against forum rules), and your AI generated fake glazing.
We don't want you here. Go huff silicone grease in the back corner of your server farm.
report back if it works at all, like I said, I hadn't tested it.

Okay, it's little weird.
When setting the speed to 0, the player still moved but slowly. Then I tried setting the speed to -100 and it was really slow.
But I was able to solve my problem from what you suggested by using Control Switches and Common Event. It's simpler than I thought.

When the player presses 'ctrl' it will trigger a common event. This event where the condition for each movement key will be to change the player's direction and thus he can't actually move. Only if the player presses 'ctrl' again will this cancel the Common Event.

Edit: There is a problem using a mouse that still causes the character to move, so it is recommended to disable the mouse in some way.


Spoiler
when you press ctrl.png
change direction only.png

Original thread: https://forums.rpgmakerweb.com/threads/preventing-a-player-from-moving-but-only-allowing-them-to-turn-around.177335/