Actor Animation

Hey everyone.

When my actors are destroyed, an explosion animation happens. But I don't want the same animation to happen every time the actor is destroyed.

Is there a way to have a random animation? So every time the actor is destroyed, a different explosion animation happens?

I want to use at least 3 random explosion animations.

Thanks everyone :)

  • Danny

Best Answers

  • SmokeyAce73SmokeyAce73 EarthPosts: 370
    edited April 2014 Accepted Answer

    Sure really easy to do:

    Create an integer attribute:

    • WhichDeathAnimation

    When the actor dies change attribute game.WhichDeathAnimation to random(1,3) - change the 3 to however animations you have

    *Create Rule if attribute self.WhichDeathAnimation = 1
    Animate with animation 1

    *Create Rule if attribute self.WhichDeathAnimation = 2
    Animate with animation 2

    *Create Rule if attribute self.WhichDeathAnimation = 3
    Animate with animation 3

    EDIT: Thanks @Braydon_SFX Self not Game

    Developer For BLUNTentertainment - Feel Free To Message Me! - Free Beginner Templates!

  • Braydon_SFXBraydon_SFX Posts: 9,273
    Accepted Answer

    Okay, so here's what you'd do:

    You'd create a self attribute - integer type.

    When the actor is going to be destroyed, change this attribute to random(1,3). This will give it a random value between 1 and 3. You can then create rules that are based off of that attribute value.

    For example:
    Rule: When attribute self.WhichAnimation = 2,
    Animate explosion 2

    Or

    Rule: When attribute self.WhichAnimation = 3,
    Animate explosion 3

  • SmokeyAce73SmokeyAce73 EarthPosts: 370
    Accepted Answer

    I'm sure @Braydon_SfX Will say the same but I'm always happy to help!

    Developer For BLUNTentertainment - Feel Free To Message Me! - Free Beginner Templates!

Answers

Sign In or Register to comment.