[project1dev] Spiketrap

  • From: Alan Wolfe <alan.wolfe@xxxxxxxxx>
  • To: project1dev@xxxxxxxxxxxxx
  • Date: Tue, 14 Jul 2009 12:49:45 -0700

Hey Kent,

For the spiketrap collision how about instead of making a touch event on the
spikes, just use the touch event on the tile to know if the player is on the
tile or not when the spikes are above the "pokeability height".

basically like... on touch of the tile where it starts the spikes coming up,
set "PlayerIsOnTile" to 1 (different from the spikes goin up).  If the touch
end event happens, set the "PlayerIsOnTile" to 0, but let the spikes keep
doin their thing.

Then, in the tick for the mob, if the spikes height is above some height
(whatever the minimum height is that should cause damage) and the tile trap
hasn't yet done damage to the player this "spiking", do damage to the player
(the "hasn't done damage yet this spiking" is to keep it from continually
applying damage to the player when they stand on it and the spikes are up).

What you think?

Other related posts: