Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
markw31415's avatar
1 year ago

Horizon Worlds - making a wall/door invisible to certain players but visible to the rest

Wondering if anyone has any solutions. I’ve racked my brain on this, and have multiple triggers/scripts floating above my level from prior attempts.

Here’s what I need. I’m creating a haunted maze, and I have certain characters situated in “scare pockets”, which are rooms connected by a door to a hallway through which I want players to walk down. The scare actors in the scare pockets will jump out through the doors to scare the other players as they walk down the hallway.  But I need the scare actors to know when to jump out. So I’ve tried all sorts of combinations of using triggers to make the door, and the wall next to the door, not visible to the scare actors in the scare pockets.  That way they can see the players coming and they can jump out at the right time. But the simpler ways make the door and adjoining wall also invisible to the players in the hallway, which doesn’t help. I’ve tried the “set who X is visible to” (or whatever it’s called) and used a player list to list everyone in the world and made the door and wall visible to them but not to the scare actor in the scare pocket. The problem is, the wall and door have to be set to be visible for this to work, and when my trigger makes them invisible to the actor in the scare pocket, they become invisible to everyone.

Can anyone think of a way to enable me to make a door and adjoining wall invisible just to one player upon demand, e.g., by entering a trigger, grabbing an object, or pushing a button?

Thanks for any thoughts!

2 Replies

  • Sounds like a fun world!   What your doing should work, might just be missing a step. Instead of putting everyone on the list what if you just put your actors on a list and then if they are there those items are set to invisible and maybe even non collidable to them. Would be a more controlled list as you can hard code their user names in. A simpler method would be to put a trigger on the side of the actors so if there are standing in it the same things mentioned. First codeblock for all should be when world is started set self to visible. Then you can attach the script to all the items. Or you could list all the objects but that might cause a very large spiderweb and more difficult to maintain. 

     I'm no pro scriptor, if still struggling you can ask the experts in discord 

    Blunet.studio/discord

    • markw31415's avatar
      markw31415
      Member

      Those are some great suggestions!  Thank you very much!  I will try them and let you know how they work.  In one implementation, I'll have separate actors.  For another though, I plan to allow users to choose whether they want to be a "monster" or a "player".  They'll go thru a portal and then they'll be tagged one or the other.  In that case the hard coded list would not work, but maybe the other techniques would.  Thank you so much again!