Name: Obby Components
Obby components provides a set of useful templates and scripts to help make more exciting obstacle courses. You can use the provided templates and adjust them as needed, or create your own obstacles by adding the “activationTimerScript” to an entity, along with an obstacle script (they all start with “obstacle”), and using event properties to connect up the logic.
Included templates
Obstacle_BlastPoint
- Loops, constantly playing an explosion that blasts players away and deals a small amount of damage
Obstacle_CollisionBlast
- An object that explodes when a player collides with it, dealing high damage and blasting away nearby players
Obstacle_FallingPlatform
- A platform that will pause for a short random time, then wobble for a short time, and then fall
Obstacle_InvisiblePlatform
- A platform which is invisible, but becomes visible for a few seconds when a player lands on it (so players must guess where it is, might work well with a rotate and move script added too)
Obstacle_SwingingAxe
- An axe (which could be changed into any object) that will swing a few times when a player enters its trigger area, before resetting. It can be adjusted to swing further, in different axes, with different dropoff and number of swings
Obstacle_TimedBlocker
- An object which will loop toggling visibility and collision, in this case a wall which will turn on and off at random times
Useful scripts
ActivationTimerScript
- This controls activating and deactivating (or resetting) the obstacles. It can have a fixed or random time to activate and deactivate, using the event properties
- This should be present on all obstacles, and the event to trigger the obstacle (e.g. OnCollision) should use the “Go” function on this
- If you tick “looping” then it will constantly activate and deactivate based on its timers from the game start
ObstacleVisibilityScript
- This can hide and show an object, optionally turning its collision on or off as well
ObstacleBlastScript
- This will play a blast sound and effect, launch players away depending on their proximity to it, if they were in the radius, and optionally do damage to them as well
ObstacleSwingScript
- This handles an obstacle playing a number of “swings”, which will end in a half-swing (so it settles to a “normal” position), before resetting by returning to its start rotation
- It will swing in one axis, which you can choose, by the given angle - it will start at that angle, then go to the negative of that angle, and then back again
- The swing dropoff determines how much “momentum” it loses with each swing, to make it look like its acting under gravity
ObstacleFallScript
- This will cause its entity to wobble (done on all clients so it appears smoother) and then move by the given vector over the given time
- When this script is reset, it will come in from the opposite of the vector that it “fell” to, i.e. if it falls directly down, then it will reset by dropping in from above to its normal position