Asylum Dev Diary 75
For the last couple of weeks I’ve been putting in to place the start of what is quite a complex series of events. There is a section of the game where the environment is flooding. This is triggered invisibly by the player (to ensure the character is in the right place at the right time). The trigger is then responsible for enabling multiple events over time that include bringing in new water sprites, enabling electrical sparking and ensuring that certain areas are hostile to the player.
That much was relatively straightforward. The second aspect however was more complex. If the player successfully switches off the power the flood must continue (obviously), but the sparking and the danger should be disabled. I had to add in additional trigger variables to allow certain aspects of the sequence to continue while disabling others. Then there’s the matter of reactivating the power. This must reactivate the disabled elements but not enable the sprites that haven’t been timed in yet.
It took some doing but that part is all sorted now. Continuing the tricky challenges this whole section has 2 additional parts for me to add in. The generator will need fuel before it can be turned back on, and then the hostile area could be fixed for good or ready to kill the player again depending on if they’ve worked out the correct sequence of events to survive the area.
I’ve also been experimenting with positional audio. This feature lets me add a sound effect to the environment, such as the water flooding, and have it adjust to where the player actually is. So if the player is to the right of the area the sound is coming from the left speaker.