An 'elevation' triggered event in SoM?

#1
People probably know that all event triggers in SoM go all the way up and down (on the Y axis) which makes a lot of scenarios hard to pull off. I just noticed one way SoM does sense the players Y-axis elevation that could be used in an event: 'pit trap' type Pieces trigger damage and a red screen flash when the player drops below ground level (ie into the pit).

This could be used to trigger falling to death scenarios or even (with a bit of work) variable damage based on how far the player falls.

Fall to death Example:
Event1 (Triggers when player walks off cliff)
‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎ 'Set Player's HP in counter0'
‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎ 'Activate Event2'

Event2(Always on) = 'Set Player HP in counter1
‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  "IF" counter0 is > counter1 [triggers when damaged by pit trap]
‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎ Change HP -999
‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  "END IF"


Variable Damage fall scenario:
Event1 (Triggers when player walks off cliff)
‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎ "Begin Timer0'
‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎ 'Set Player's HP in counter0'
‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎ 'Activate Event2'

Event2(Always on) = Set Player's HP in counter1
‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ''Set Timer0's value in counter2'
‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  "IF" HP in counter0 is > HP in counter1 [triggers when damaged by pit trap]
‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  "Decrease counter1 by Counter2's value [reduces HP based on fall time]
‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  Set Player HP to counter1's value
‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  Move Object [raise invisible floor Object to stop pit trap's damage]
‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  Disable Event2
‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  ‎  "END IF"

Pit trap Piece's don't seem to do much damage, but you can amplify their damage with an event similar to the 'fall scenarios' so they could be used for lava Pieces, or underwater air-deprivation damage also.
Might be worth the effort if it's important to the game. It's the only possible Y axis trigger I know of. :)

Edit: Made a demo showing the 'fall to death' trigger setup. It's attached.
‎  ‎ 


Attached Files
.zip   Pit-Trap Damage Trigger Demo.zip (Size: 19.41 KB / Downloads: 156)
Reply



Messages In This Thread
An 'elevation' triggered event in SoM? - by HwitVlf - 2011-03-03, 05:11 AM



Users browsing this thread:
1 Guest(s)