Sunday, 17 April 2016

Craig Lang - Fire and Switches





I revisited the VFX tutorial from last term's game encounters lecture when we created the fire. I used the same technique used within that tutorial by creating particle system and adding a 4 image plane sprite. The sprite image is divided into four sections each with its own fire image. The particle system goes through each section one by one to create an animation. I then adjusted the settings to the preferred style I wanted. I then added a capsule collider as a trigger and the attacking script.


For the switches I created a fire switch script which consisted of a coroutine. The coroutine will turn off the fire by deactivating the object using setactive(false). However by doing this all the fire truns off. I then separated certain fire objects into their own prefabs. I then called the prefabs and turned the prefabs off thus turning off the fire particles I wanted. Seeing that this worked I saw an opportunity to create a time event. By adding waitforseconds I created a timed event on which the fire is reactivated after a number of seconds. This added another challenge to the player as they must navigate from switch to switch in order to get to the final switch which turns off the fire blocking the bridge.

No comments:

Post a Comment