#(mrcrash) lock player vision

53 messages · Page 1 of 1 (latest)

high gust
#

It is possible to lock the player vision?

lime dewBOT
#

(mrcrash) lock player vision

lime dewBOT
#

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>

glacial solstice
high gust
#

I want to make a npc speak, when the player right clicks the npc thiw view is locked

glacial solstice
#

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

high gust
#

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
?

glacial solstice
#

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

high gust
#

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?

glacial solstice
#

No, and that's not a #1026104994149171200 topic either way

high gust
#

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 ?

peak light
high gust
#

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 ?

glacial solstice
#

!m fake_spectate

narrow schoonerBOT
#
Possible Confusion

Did you mean to search for spectate?

#
Possible Confusion

Did you mean to search for command fakespawn?

glacial solstice
#

!s spectate

narrow schoonerBOT
# glacial solstice !s spectate
Search Results

[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.

glacial solstice
#

Oh that's spectate, nvm

high gust
#

?

glacial solstice
#

Thought it was a differnt mechanism

high gust
#

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

high gust
peak light
#

!e player moves

narrow schoonerBOT
# peak light !e player moves
Cannot Specify Searched Event

Multiple possible events: vehicle moves, player item takes damage, player clicks in inventory.

peak light
#

!e player walks

narrow schoonerBOT
# peak light !e player walks
Group

Player

**WARNING**

This event fires very very rapidly!

Event Lines

player walks

Triggers

when a player moves in the slightest.

Has Player

Always. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.

Context

<context.old_location> returns the location of where the player was.
<context.new_location> returns the location of where the player is.

Has Known Location

True - this adds switches in:<area> + location_flagged:<flag name>.

Cancellable

True - this adds <context.cancelled> and determines cancelled + cancelled:false.

high gust
#

oh, i speak about when the player move this view

high gust
#

maybe spam adjusting th player view pitch/yaw to make it looking the npc

high gust
#

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```
full ruin
#

you can use a while loop

#

!c while

narrow schoonerBOT
# full ruin !c while
Group

queue

Syntax

while [stop/next/[<value>] (!)(<operator> <value>) (&&/|| ...)] [<commands>]

Short Description

Runs a series of braced commands until the tag returns false.

Description

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.

high gust
#

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"```
deep jungle
#

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.....```
high gust
#

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 ?

high gust
#

yeah working perfectly ty