Sensors

chaosoul

  • *
  • Posts: 260
Im trying to use sensors to make enemies get hurt but you can walk through them still so can someone give me a tutorial for sensors or a brief explanation how to use em?
COOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEESS

Greg

  • *
  • Posts: 1260
A sensor is simply a shape that can still detect collisions, yet doesn't produce a physical response (collision).

So when something collides with a sensor, it produces a collision event (the "collision" wrapper block in design mode).  So your behavior would simply check the collision group of the last collided Actor, and then deal the damage as appropriate.  Take a look at how the Health behavior works that is on Forge (part of the health pack). 

chaosoul

  • *
  • Posts: 260
Ahh thanks I fixed my problem by making another collision box then making one a sensor and the other no sensor but different collision type
COOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEESS