Fully-functional Pentagram Rocks
Above: Rocks (placeholder) – when two are destroyed, a pentagram line opens up between them
Each of the five pentagram rocks have a given #ID. This ID is passed to the level blueprint upon destruction so it can communicate with the rest of the code and create a response.
The code required communication between actors (the rocks) and the level blueprint.
- Destroying certain rocks trigger certain dialogue or ability-freezing events
- Destroying rocks in a certain sequence creates fault lines that open up in the ground between them as an additional obstacle for the player
- Destroying all five rocks will end the level and enter ‘victory state’
Passing the #ID was EXCEPTIONALLY difficult. It was made even more of a challenge by the fact that I had to track the intact/destroyed states of all 5 rocks as well. I found that I was unable to actually destroy the object otherwise the code would freeze when it came back round to any code referencing the (now destroyed) actor. Instead I was forced to hide the rocks to let the code do its thing quietly in the background. To maximise efficiency, I used a combination of ‘do-once’ nodes and state-tracking.
Fully-functional Pentagram Lines
As the five pentagram rocks are destroyed by Lil’ Death, cracks in the ground open up between them as ‘fault lines’. Below is a diagram and table detailing the specifics of how the destruction of each rock relates to the generation of a new fault line in the ground.
|Rock #ID||Other Destroyed Rocks||Draw Line|
Fully-functional Falling Rocks
The rocks that fall from the sky must spawn within a layer at a given y-position above the ground.
- After spawning, falling rocks are propelled towards the ground with force (handled in level blueprint)
- Rocks will be destroyed if they come in contact with a solid obstacle
- This includes Lucifer’s stationary model
- Upon collision with player, falling rocks deal damage
- The rocks need a bound to spawn within, and an algorithm to create randomness
‘Freezing’ abilities for tutorial
- Player state can be changed via the level blueprint
- This state can be changed on the level blueprint according to a given integer to represent that state and its change
- The integer is the #ID passed from destroyed rocks and event triggers
What is left for Treachery?
- Falling rocks algorithm development and finalisation
- Create trigger-points for tutorial and dialogue – progression flow + railroading