GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

"Animation cycle over animation cycle (finish), and returning to previous animation cycle."

Hi brothers! I need more Help!! This is for the animation frequency for the same character.
I have this actor standing, with his own animation cycles, so I push a button and another animation spawns over it,
erasing the first.. but when this new animation stops this actor is destroyed and the first actor spawn again.
"Animation over animation, returning to previous animation."
How Can I make?
An actor(B), spawn over other actor(A) (making actor(A) disappear)
And
When actor(B) stops(finish) Returns to spawn actor(A)
Help!

Comments

  • tatiangtatiang Posts: 11,698Member, Sous Chef, PRO, Senior Sous-Chef

    In actor(A), do When touch is pressed, spawn actor [actor(B)] in front of actor. Then destroy actor [actor(A)] right after that.

    Since you know the filename of the last image in the animation sequence -- let's assume it's ninja42.png -- you would set the rule condition to When attribute self.Image = ninja42, spawn actor [actor(A)].

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • PotatoesAppsPotatoesApps Posts: 53Member

    Thnx!!!
    Ill try it right now :)

  • PotatoesAppsPotatoesApps Posts: 53Member

    Ok, it didn't work. I tried the name of the file without the .png and nothing happened.
    Anyway.. I realize that it is not what I need. :)
    Can you help me with this 2 setups?
    1. Imagine 1 main actor, our char. For that char what I need is to setup a random play of different animations.. but they have different duration. so I set a random value but, it plays one animation over the other... The main still frame is there too.
    2. The main actor have his own cycle of animations.. but when I touch another actor (a button that gives the main actor another animation) the main actor should stops what ever its doing and plays the animation that this actor gives to it.
    Help! And thnx a lot in advance!!

  • tatiangtatiang Posts: 11,698Member, Sous Chef, PRO, Senior Sous-Chef

    I don't have a lot of experience with animations so I'm going to defer to @Socks. I suspect you may need to use a custom animation method.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • SocksSocks London, UK.Posts: 12,822Member

    @PotatoesApps said:
    Ok, it didn't work. I tried the name of the file without the .png and nothing happened.
    Anyway.. I realize that it is not what I need. :)
    Can you help me with this 2 setups?
    1. Imagine 1 main actor, our char. For that char what I need is to setup a random play of different animations.. but they have different duration. so I set a random value but, it plays one animation over the other... The main still frame is there too.
    2. The main actor have his own cycle of animations.. but when I touch another actor (a button that gives the main actor another animation) the main actor should stops what ever its doing and plays the animation that this actor gives to it.
    Help! And thnx a lot in advance!!

    I'm not sure I understand the question perfectly.

    Is the question: I would like to be able to randomly change an actor's animation with a button ?

  • tatiangtatiang Posts: 11,698Member, Sous Chef, PRO, Senior Sous-Chef

    I think so... to switch animations mid-sequence.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • PotatoesAppsPotatoesApps Posts: 53Member

    Please can you take a look at this video.https://youtube.com/watch?v=S7zdN7SE62s
    Im doing the same thing.

  • PotatoesAppsPotatoesApps Posts: 53Member

    @Socks said:Is the question: I would like to be able to randomly change an actor's animation with a button ?

    Well, not randomly. Random is for the "no touching button time for the actor".
    There are more than one button that make him do some animation on the same actor.

  • tatiangtatiang Posts: 11,698Member, Sous Chef, PRO, Senior Sous-Chef

    When an animation is running and the player presses a button to start a new animation, should the current animation stop or should it continue until it ends and then play the new animation after that?

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • PotatoesAppsPotatoesApps Posts: 53Member

    it should stop and play the other.

  • SocksSocks London, UK.Posts: 12,822Member

    @PotatoesApps said:
    Please can you take a look at this video.https://youtube.com/watch?v=S7zdN7SE62s
    Im doing the same thing.

    Here's a couple of quick ideas, press the grey button to randomise the animation.

  • PotatoesAppsPotatoesApps Posts: 53Member

    Those are amazing! Ill try to make it now!!
    Thnx a lot!

  • PotatoesAppsPotatoesApps Posts: 53Member

    Great, I finished the first screen.. it worked! I used your 2nd concept, thnx a lot!
    I made the main actor (Cow) with the cycles for each button. Fantastic.
    And I made another actor with 3 randoms movements for the Cow, for when it is still.(value=0) then timer 0.1 =random

    What happens is that the main actor "still frame" changes when I press the buttons and start the animations..
    The 0.1 that shows the original still frame, shows random..
    When I turn off the actor with the 3 randoms works well.
    :# Any tip?

  • SocksSocks London, UK.Posts: 12,822Member

    @PotatoesApps said:
    Great, I finished the first screen.. it worked! I used your 2nd concept, thnx a lot!
    I made the main actor (Cow) with the cycles for each button. Fantastic.
    And I made another actor with 3 randoms movements for the Cow, for when it is still.(value=0) then timer 0.1 =random

    What happens is that the main actor "still frame" changes when I press the buttons and start the animations..
    The 0.1 that shows the original still frame, shows random..
    When I turn off the actor with the 3 randoms works well.
    :# Any tip?

    I don't understand any of that, the language structure is too vague for me. :|

  • PotatoesAppsPotatoesApps Posts: 53Member

    ok, sry.
    The char is still until I touch some button. I want to add random sequences to the moment you don't touch nothing.
    At your concept, what can be the best way to add random sequences to the actor (not by pressing button)

  • SocksSocks London, UK.Posts: 12,822Member

    @PotatoesApps said:
    ok, sry.
    The char is still until I touch some button. I want to add random sequences to the moment you don't touch nothing.
    At your concept, what can be the best way to add random sequences to the actor (not by pressing button)

    Sorry to be a pain, but I genuinely get lost when questions are even a little bit vague (seriously!), the fact that you are calling something by two names ('char' and 'actor') is usually enough for me to give up on a question (seriously!) :smile:

    This line . .

    "I want to add random sequences to the moment you don't touch nothing"

    . . . is particularly mysterious :smile:

  • PotatoesAppsPotatoesApps Posts: 53Member

    hahhaha!!! Im so sorry!!!!

  • PotatoesAppsPotatoesApps Posts: 53Member

    look at it, and press the buttons like a savage!!!

  • PotatoesAppsPotatoesApps Posts: 53Member

    any clue?

Sign In or Register to comment.