After a few discussions about the level design we came up with a few ideas on how to make some interesting interactions that the payer can make with the level. One of which was a door that can only be opened when enemies in the area have been destroyed. The other was a pile of rubble that has to be exploded using a detonator to progress through the level.
I wanted to add a door system in the game so that players have a reason to fight the enemies and it will prevent players from ignoring the enemies. At the moment, I’m using a rock asset as the door but in the future I plan to have that replaced with a door asset. I created a similar system for the door used in the game jam entry called ROOM. Instead of waiting until all the enemies had be killed the doors in ROOM only opened when all the rubbish had been picked up.
The door opens using a timeline that moves from the value of 0 to 1 in a linear path. This float value is multiplied by a set door opening distance which updates the relative location of the door. Using a timeline allow the door to smoothly open without creating an actual animation. Timelines also allow the speed of the movement to be changed easily within the engine.
I wanted to make this door easy to modify so I created an empty array of intractable characters so that enemies can assigned to the door. When the enemy is destroyed they are removed from the array and when the array is empty the door will open.
The idea behind the exploding rock/rubble was another way to prevent the player from speeding through the level. At the moment the detonator (it’s a cube at the moment) triggers when the player overlaps with it but I plan on making it activate when the player uses the slam ability to trigger the explosion.
Rees, O (2019). Door opening when enemies are destroyed. [offline]. [Accessed 04/04/2019].
Rees, O (2019). Door opening timeline setup. [offline]. [Accessed 04/04/2019].
Rees, O (2019). Door opening logic. [offline]. [Accessed 04/04/2019].
Rees, O (2019). Detonating the rock obstacle using the detonator. [offline]. [Accessed 04/04/2019].
Rees, O (2019). Detonator trigger blueprint. [offline]. [Accessed 04/04/2019].