Animation on collide??

CaptFinnCaptFinn Member Posts: 1,828
edited November -1 in Working with GS (Mac)
is it possible to do a Actor receives overlaps/collides with animation?

Example Hero has a shield. the shield is a animation of a circle animating between 3-4 different colors. If a bad guy hits shield with bad bullet. Can shield take commands?

Comments

  • calvin9403calvin9403 Member Posts: 3,186
    can you post a video or something
  • CaptFinnCaptFinn Member Posts: 1,828
    Im protecting a bunker with a shield. the shield is a animation of a circle around the bunker. it animates between 3-4 colors and loops. This makes the shield look alive and powered up. I want the shield to take 3 hits and destroy. leaving the bunker exposed to 1 hit and game over. So basically when shield collides with enemy or enemy fire a total of 3 times. the shield collapses and the bunker is now vulnerable to enemy fire. So I need the enemy to effect the animation of the shield.
  • CaptFinnCaptFinn Member Posts: 1,828
    animation is not a actor. so i cant choose animation in the actor collides with rule.
  • calvin9403calvin9403 Member Posts: 3,186
    than just make an attribute set it to 3 (int)
    when enemy overlaps or collide with shield, minus one to the attribute
    when attribute equals 0, destroy
  • CaptFinnCaptFinn Member Posts: 1,828
    But I cant name the animation "shield" so how do i set collide with shield. there is no actor called shield. there is only a animation with 4 pngs each one a different colored circle.

    Or can I. How do I make 3-4 images 1 actor to name.
  • calvin9403calvin9403 Member Posts: 3,186
    Jeffnichols said:
    But I cant name the animation "shield" so how do i set collide with shield. there is no actor called shield. there is only a animation with 4 pngs each one a different colored circle.

    Or can I. How do I make 3-4 images 1 actor to name.

    than when attribute is 3 animate ...
    when attribute is 2 animate ...
    when attribute is 1 animate ...
    when attribute is 0 don't animate
  • CaptFinnCaptFinn Member Posts: 1,828
    One of us isnt understanding the other. My animation is 3-4 different colored circle .png files. placed in a animate behavior. The animation doesnt have a name. When I choose when actor (bad bullet) collides with ( drop down menu) there is nothing in the drop down menu to represent the animation.
  • ozboybrianozboybrian PRO Posts: 2,102
    Have an actor. With Attribute.
    For each attribute have a different rule saying change image or animate. Sounds pretty simple. I think..
  • calvin9403calvin9403 Member Posts: 3,186
    no, use attribute

    so when attribute is 3, animate something
  • calvin9403calvin9403 Member Posts: 3,186
    so did you got it?
  • DreamLabDreamLab Member Posts: 2,127
    Make a new actor. Tell it to animate. You could either do one of these two ways. maybe more

    Have the bunker animate, and put an invisible actor on top of the animation. Make an integer attribute. set it to 3. every time it gets hit, -1. when it gets to 0, destroy the invisible actor and tell the bunker to stop animating. and how you do that, is make a boolean or another integer. set it to false(or 0). and when you GET the shield, make it true. when its true, animate, OTHERWISE false. Get it?

    the other way would make the invisible actor animate and turn it visible but it looks like that way might work. Hope this helped.
  • Rob2Rob2 Member Posts: 2,402
    Have you sorted this yet Jeff ?

    I'm not quite sure what you are trying to do but the animation behaviour is just an automatic image cycling function so you can certainly set up a rule that switches when a collision occurs at the same time as a particular image is shown within an animation.
Sign In or Register to comment.