Only collide with head?

raggragg Member Posts: 65
edited November -1 in Working with GS (Mac)
Hey guys,is it possible to make the actor only collide with others with its head?example when only the main actor's head collide with enemies,it get destroyed.any help pls

Comments

  • JamesZeppelinJamesZeppelin Member Posts: 1,927
    Yes, however the head will need to be a separate actor.
  • JamesZeppelinJamesZeppelin Member Posts: 1,927
    Yes, however the head will need to be a separate actor...

    or have a small invisible actor follow where the head is
  • JamesZeppelinJamesZeppelin Member Posts: 1,927
    oops not sure how i double posted sorry... but yeah , NM what i said since you cant beat tshirt's vid :)
  • rebumprebump Member Posts: 1,058
  • raggragg Member Posts: 65
    Thanks for the quick reply!I tried that but sometime it works n sometime don't..I made an actor for the head position n when it collide with enemy,my main actor get destroyed by using a game Boolean,but sometime the enemies just kept moving to my main actor and crash with the main actor even though the enemies are already colliding with the head actor..which should cause the main actor destroyed in the first place..
  • rebumprebump Member Posts: 1,058
    You need to use logic to ensure the body is destroyed and has definately occured before destroying the head (assuming that is what you want). If the command, in the head actor, to destroy itself is at the same execution level as the game attribute boolean used to tell the body to destroy itself, the head may destroy itself before it gets to the command that sets the boolean leaving the body wandering about without a head. Sometimes that logic works but sometimes it doesn't (and for me more than often it doesn't). So you have to implemement a timer delay for the destroy self command or use a game attribute as a communication device between the head and body. Or something thereabouts.
  • rebumprebump Member Posts: 1,058
    Basically what it comes down to is behaviors in an actor at the same nested execution level (i.e. at the root level, or within the same timer, same rule, etc.) can run in pretty much any order. Typically it is top-down but that is not guaranteed. This came from a GS dev in another post.
  • raggragg Member Posts: 65
    Thanks rebump!I reposition my head actor and unset it from destroying, now it is working better. Thanks alot for the reply!
Sign In or Register to comment.