(MAD) Environment Hazards
By Mad-Eye#2971 on Discord
This package contains some scripts and parts for making environment traps from voxel meshes with effects and sounds.
There are three example scenes you can drag into a map to see how these might be used. All of the scripts have properties that allow them to be used for more than the examples assembled here.
In This Package
- (MAD) Jungle Scene - A jungle with a quicksand pit. The player can only walk very slowly in the pit and cannot jump. They can mantle to climb out, however.
- (MAD) Lava Scene - A rocky area with bubbling lava. The lava doesn’t just kill the player; it sets the dying player on fire.
- (MAD) Acid Scene - A tank of deadly liquid. The player will have to lower the level of the liquid to explore the bottom of the tank.
- lavaHazard: This is a voxel mesh with a lava script and effects applied. It works out of the box.
- quicksandHazard + quicksandMesh: The quickstand component. The voxels are just visual. The behaviour comes from the trigger.
lavaScript - Kills and ignites the player
- Can attach a template to the player so they burn as they ragdoll.
- Optionally can just play a sound instead. I use this for the acid.
quicksandScript - Makes an area hard to escape.
- Place on a trigger. Players will have their movement slowed like in quicksand.
twoPositionMoverScript: Smoothly moves an entity between two positions
- The start position is where the entity is in the editor. The end position relative and set in the properties.
- It has a separate property for rotating an entity in a full circle because doing that with timelines causes strange behaviour (gimbal lock).
soundLoopScript - Plays a sound repeatedly after a set time.
- This is used for the lava ambience, which doesn’t loop on its own.
- To look any non-looping sound you need to measure how long it is.