#(mrcrash) lock player vision
53 messages · Page 1 of 1 (latest)
(mrcrash) lock player vision
Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
You can block this bot if you don't want to see these messages, I won't mind.
<@&525394568410038282>
You can just cancel the move event, although I believe the smoothest way is making them spectate something - do you want them to still walk? what are you trying to make?
I want to make a npc speak, when the player right clicks the npc thiw view is locked
If you want to just prevent them from moving away cancelling the move event is a valid way, but it will look a bit jittery if they try moving
Otherwise as I said, making them spectate another entity is an option
Forces the player to spectate from the entity's point of view
So i need to
1 spawn a invisible entity looking at my npc
2 spectate the player to this entity
?
That should work as a quick and simple thing to lock them there yeah - there's also fake spectating and stuff but just regular spectating should be fine here I think
ok i will try and see what happens, thanks
Last thing, by chance do you have any knowledge about core shaders or would it be better to create a thread about it?
No, and that's not a #1026104994149171200 topic either way
okay np
i keep this one open until my lock vision work 😉
And what's about cancel the spectate mech ?
Note: They cannot cancel the spectating without a re-log -- you must make them spectate themselves to cancel the effect.
Like: - adjust <player> spectate:<player>
mb
Hm, i want to use the on player starts sneaking to cancel the spectate but look like a spectate player can't sneak, any idea ?
could mount the player & adjust to spectator instead, would be able to detect input that way
Can be a solution, but when the player is mounted that display "press lshift to dismount" on the actionbar, but i guess is the only way to do ?
!m fake_spectate
Did you mean to search for spectate?
Did you mean to search for command fakespawn?
!s spectate
[Perfect Name Match] !Mechanism playertag.spectate,
[Partial Name Match] !Event player spectates entity,
[Semi-Strong Match] !Command mobarena,
[Semi-Decent Match] !Mechanism playertag.spectator_target, !Event player stops spectating entity.
Oh that's spectate, nvm
?
Thought it was a differnt mechanism
Oh np
Nvm, i think i'm just gonna cancel the move event because when the player is spectating an entity, the right arm of the player can still move, so that make some weird thing
Just, what is the event to cancel this one?
!e player moves
!e player walks
Player
This event fires very very rapidly!
player walks
when a player moves in the slightest.
Always. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.
<context.old_location> returns the location of where the player was.
<context.new_location> returns the location of where the player is.
True - this adds switches in:<area> + location_flagged:<flag name>.
True - this adds <context.cancelled> and determines cancelled + cancelled:false.
oh, i speak about when the player move this view
maybe spam adjusting th player view pitch/yaw to make it looking the npc
Any better wxay to do this?
Actually i use on ticks but isn't optimised
- flag <player> is_speaking:<context.entity>
- flag server speakers:->:<player>
- adjust <player> fov_multiplier:1
on tick:
- if <server.flag[speakers].exists>
- foreach <server.flag[speakers]> as:__player:
- look <player> <player.flag[is_speaking].eye_location>
- actionbar "<&7>Sneak pour quitter"
on player starts sneaking flagged:is_speaking:
- flag <player> is_speaking:!
- flag server speakers:<-:<player>
- adjust <player> fov_multiplier:0
on player walks flagged:is_speaking:
- ratelimit <player> 20t
- determine cancelled```
queue
while [stop/next/[<value>] (!)(<operator> <value>) (&&/|| ...)] [<commands>]
Runs a series of braced commands until the tag returns false.
Runs a series of braced commands until the if comparisons returns false. Refer to !command if for if command syntax information.
To end a while loop, use the 'stop' argument.
To jump to the next entry in the loop, use the 'next' argument.
never really use a while with succes
let me try one more time
something like:
- if <server.flag[speakers].exists>
- foreach <server.flag[speakers]> as:__player:
- while <player.has_flag[is_speaking]>:
- look <player> <player.flag[is_speaking].eye_location>
- actionbar "<&7>Sneak pour quitter"```
Why are you using a server flag with all the speakers
Apply the flag where you need to, then run a while loop after that
on player right clicks entity_flagged:testo:
- flag <player> is_speaking
- adjust <player> fov_multiplier:1
- while <player.has_flag[is_speaking]>:
- look <player> <context.entity.eye_location>
- actionbar "<&a>Text"
- wait 5t
on player starts sneaking flagged:is_speaking:
- flag <player> is_speaking:!
- adjust <player> fov_multiplier:0
on player walks.....```
I have never managed to use a foreach for anything other than a flag server..
Oh i Can just use a while on a queu to make a loop ?
yeah working perfectly ty