Replacing one actor with another ?

kollfinnkollfinn Member Posts: 76
edited February 2012 in Working with GS (Mac)
Hello guys !

I cant get this to work !!! =(

I have an actor with that does different stuff. ( eats, stands, runs and more)
How can I get it to go from standing to eating and then back to standing again ?
I know how to get it from standing to eating, but I cant get it back to the "standing" animation again =(

How do I do this ?

When ball collides with "standing" "destroy"
When "standing" collides with "ball" destroy and spawn actor "eating"

NOW I DONT KNOW HOW TO GET IT BACK TO "standing" AGAIN ???

Thanks !

Comments

  • kollfinnkollfinn Member Posts: 76
    Sorry I didnt mean that !=( I ment , after the second actors animation is finished, I want the first actor to appear infront of the second actor. ?
  • zombieaddictzombieaddict Member Posts: 213
    spawn behaviour. choose the actor to spawn. make sure its set to spawn "in front of actor" aswell.

    destroy the actor behind it if you need to
  • kollfinnkollfinn Member Posts: 76
    Ok, so i set the "spawn" behavior after the actors animation ?
  • MotherHooseMotherHoose Member Posts: 2,456
    edited February 2012
    why 2 Actors?

    1 Actor:

    Animate Behavior

    Rule: when
    Attribute: self.Image = lastImageInAnimation.png
    --Timer:
    ---After: 0.3 seconds … whatever you want for delay … if no delay … don't put in the timer
    ----newAnimation

    if there are size/position changes for the newAnimation … use changeAttributes before that animation

    @};- MH
  • kollfinnkollfinn Member Posts: 76
    Hello MotherHoose !

    Its many different animations of the same actor =)
    Thank you sooooo much !
  • kollfinnkollfinn Member Posts: 76
    Shall I use Attribute: self.Image is latImageInAnimation.png or is "lastImageInAnimation" just that i should have the name of the last image there ?
  • MotherHooseMotherHoose Member Posts: 2,456
    yes … just the name of the last image in the animation …

    when I do image changes/animations … I drag in the Change Image behavior in and turn it off … and then by scrolling thru that, I know the correct names
    when it works correctly … I delete that Change Image behavior

    @};- MH
  • kollfinnkollfinn Member Posts: 76
    I cant get it to work....maby Im doing something wrong.

    I want to do this:

    When "ball" collides with actor "monster" change animation to "monster eating"
    after the last image in the "monster eating" animation I want to change animation back to "monster".

    Sound hard ?
    I cant get it to work =(
  • MotherHooseMotherHoose Member Posts: 2,456
    on the Monster:
    Rule: when
    Event: overlaps or collides with ball
    --Animate (the eating one)
    Otherwise:
    --Animate (the regular one)

    and that is even easier

    @};- MH
Sign In or Register to comment.