How to make my invisible hit-box actor destroy my player when it collides with danger!

RPRP Member Posts: 1,990
edited March 2012 in Working with GS (Mac)
Hey guys

I got stumped at a point here. I made a non-visible hit-box/collision box that overlaps my player. I have it working via the constrain and all is dandy (follows my moving player etc.), but how the heck do I tell the collision box to destroy my visible player? The player itself is animated and has a death animation (and other behaviors) when it collides with enemy "bullets".

I still got to add a health bar onto this dude, but I wanted to try and figure this out before I did. I can find lots of info on how to create custom collision, but as far as destroying the targeted actors, I can't seem to find what I'm looking for. Is there a method to tell the collision, say between a bullet and the collision box over your player actor to just execute the behaviors and rules associated with the player actor? (in this case my player actor has a lot scripted in there).

I hope that makes sense...we'll see!

Anyways, thanks as always!

Best Answer

  • JohnPapiomitisJohnPapiomitis Posts: 6,256
    Accepted Answer
    Make a game attribute called hit.

    In your collision box when actor collides with whatever,
    -change attribute hit to true

    Then in the actual player actor when hit=true
    -do whatver

Answers

  • RPRP Member Posts: 1,990
    @ JohnPapiomitis Sweetness, that worked hombre.
Sign In or Register to comment.