help need - trigger ani only once

Discussion in 'How Can I...?' started by simonsaunders, Mar 12, 2016.

  1. simonsaunders

    simonsaunders Boxer

    Joined:
    Feb 17, 2016
    Messages:
    39
    Likes Received:
    2
    set as platformer, which might not be the best choice?

    im using a tree as a character and i want it to naturally fall down, (ive set this up as ani in default ani) the same way a tree would in real life, so pivot point would be at the bottom . the fall would happen very slowly. BUT if you wanted to interrupt and stop the tree falling naturally, you press spacebar and the tree stays upright.

    THE PROBLEM
    holding the space bar continually keeps the static tree ani triggered - which i dont want. i want it to work so you must repeatedly hit the space bar to stop the tree falling... so only the animation triggers once.

    im banging my head against this dam tree trying to work out this.. :)

    any help appreciated thanks
     
  2. Phill Mason

    Phill Mason Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    880
    Likes Received:
    721
    It sounds like the control you're using to keep the character (tree) upright. What control are you using for that?

    ~ I would guess if you're using the 'jump' control, then adjust the jump timeout to a lower number like 0.1 for example, this will shorten the effective time that the jump is active.

    ~ If you're using the shoot function, to fire a bullet or something similar then you can adjust the spawn rate to a number that fits how often you need the user to tap the spacebar. You'll need to play around with this for a while, but it could be something like 1.72 or some random odd number that works well with your tree falling.
     
  3. simonsaunders

    simonsaunders Boxer

    Joined:
    Feb 17, 2016
    Messages:
    39
    Likes Received:
    2
    hey phil. using shooting ani for control. btw im using BB1

    not using spawn.

    if i put the ani into jump ani - the ani it actually jumps which i dont want
     
  4. Phill Mason

    Phill Mason Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    880
    Likes Received:
    721
    Ok, not sure how you can achieve that at this point. Difficult to say without seeing anything, screenshots, bbdoc example etc.
    If you're not using a spawner, then nothing is being shot right?
    How are you getting the character to stay upright using the shoot function?
     
  5. simonsaunders

    simonsaunders Boxer

    Joined:
    Feb 17, 2016
    Messages:
    39
    Likes Received:
    2
    using shoot function to only trigger ani on keyboard press. there is no shooting. i could use jump ani instead to trigger it but then the character jumps which i dont want
     

Share This Page