Asset and script
Does anyone have horror asset I can use. Also anyone have tutorial where u put key in and teleport show up. I gonna make new world as horror edition
There are some horror asset in the asset library that you could use.
For horror assets, be sure to look in the Asset Library (shopping bag icon) under the Horror section. There are a ton of assets you can use in a custom model import world. Additionally, there is an advanced tutorial world called "Chop ‘n’ Pop" which as a horror based game. We are free to repurpose anything in these tutorial worlds.
For the key scripting behavior you will want a few scripts. I would suggest starting in code blocks to begin understanding the way Horizon Worlds applies logic.
- First you will want to add a trigger gizmo to the world over the key hole. In the properties you will need to select the drop down to change Detect Players to Detect Tagged Objects.
- A new text field will appear directly below where you will need to enter a word like "key". This is case sensitive.
- Open the properties of your key object and at the top go to the Gameplay Tags, select Add Tag, and enter "key" or which ever gameplay tag used in the previous step.
- Add a new script gizmo and at the top name it something that makes sense to you.
- Use the attached image to help. The grey comment blocks are not important, they just help explain what is happening. Remember to add an object variable for you Teleport trigger.
note: This all assumes you have a teleport script running on a trigger in front of the door, and a return script running on the key itself to hide the key again when dropped. Here are examples of what these could look like, but you should use whatever you are familiar with as I prefer to use an invisible Snap Destination Gizmo for return scripts as I can use it to get both the position and rotation.