Triggering an Event when an Enemy Dies
I will show you an
easy way to trigger events that will happen only when an enemy dies. In
this example you will see that it is very easy to setup and you will not
need flipmaps or any advanced techniques. All you need is a switch
trigger. A switch trigger? Are they not supposed to be used with
switches? Well, yes indeed, but there is also another way to use this
type of trigger. Follow me and I will explain further!
Here is what we want to accomplish:
1. Trigger an enemy with an ordinary trigger.
2. To be able to walk on the event triggers but not activate them until the enemy is killed.
3. Trigger events when the enemy is dead.
Here is the 2D map in my project. The red ellipse covers the area we are going to dig deeper into.
As you can see this spiral formed area is actually 3 similar rooms. In the middle one we will place our enemy.
The enemy will be triggered in a room just before the 3 'spiral' rooms so he can roam free when Lara enters his realm.
After the 'spiral' rooms there is a corridor with a closed door that leads to another room. In the corridor I have placed some triggers:
Now we need to make one
more trigger. Without this final trigger, Lara would be able to get past
the enemy and activate the door, camera and CD triggers herself. In
other words, no need for the enemy to appear at all!
Highlight the enemy and set a trigger on the same square as the previous ones. Make sure it is a switch trigger this time! (Ignore the triggers to the left as they have nothing to do with this tutorial!)
By adding this
final switch trigger, the other triggers will be frozen until the enemy
dies! They will actually act as Trigger Triggerers but with the feature
that they will only work when the enemy is dead! It really is that
simple. Now go and experiment with possible versions of the same idea.
Maybe you want another enemy to appear after the first one?
With this setup you are forced to kill the enemy to be able to get out to the next room. This will prevent early or misleading events to happen. Also it will prevent an enemy still lurking around using precious memory in your project. There will of course not be any need for a flipeffect 46 to kill any remaining enemies now.
In this example I have forced the events to happen after you killed the enemy. You still need to walk on the trigger square though. One version of the same concept is to make switch triggers on every square in the room where Lara is in. If done correctly, the events will happen right after the enemy dies as Lara is already standing on the triggers! It is harder to do though and you need to plan ahead to make a room that is maybe smaller and better suited for that purpose than the rooms in this project.
There are more advanced versions of this trick but more of that in the advanced version! There is also a catch - you can only do it once. In other words you can't trigger one enemy, kill it and trigger another enemy over and over. It works only once. If done with imagination, this trick can have many uses though and hopefully inspire you to make more interesting puzzles.
Anders "QRS" Svensson
(Credits to TRwad (Michiel) for the great info about this!)
Note - It may be necessary to use One Shot on your baddie switch triggers as you may have problems with triggers repeating themselves continuously while Lara is standing on them otherwise.