Stop all Active Actions for character

  • #1, by darren-beckettFriday, 12. February 2016, 16:02 5 years ago
    What's the best way to stop all Active Character actions?

    I have multiple Character actions which control a character whilst idle. What I need is a way of stopping all active actions of a certain character that match the naming convention of "Idle[something]"

    E.g.
    IdleLookAround
    IdleWalkAbout
    IdleAnotherAction
    IdleAction...

    Great Poster

    351 Posts


  • #2, by afrlmeFriday, 12. February 2016, 17:49 5 years ago
    These are custom actions you created to be triggered in a loop of some kind? Or they are general random animations?

    If you are manually calling them somehow then you could create a global table (Lua) or even create multiple called by other action blocks with if queries in them that contain a set random value action part & some if queries to determine which action should be performed & which should not.

    If you were to use the Lua method then if you were to create a global table then it would be possible to simply overwrite the table with whatever data you wanted, say... the names of the actions you want it to select from. You would then select a random entry from said table & call the action associated with it.

    P.S: sorry if I've misunderstood what you are wanting to do.

    Imperator

    6842 Posts

  • #3, by MachtnixFriday, 12. February 2016, 20:22 5 years ago
    I'm not sure what you want neither. If you want to stop an action you can write a little action with "end the running action" (there is something like this in the action list) and call it everywhere - perhaps by mouseclick or another action. So if some actions make your character do some idle moves and you stop these actions, the idle animation will stop also, won't it?

    Thread Captain

    1087 Posts

  • #4, by darren-beckettFriday, 12. February 2016, 20:55 5 years ago
    These are character actions that contain sequences of character movements and animations that are triggered when the following character catches up and becomes idle for some time.

    I would ideally like a way to dynamically loop through and stop any active actions for the following character.

    Great Poster

    351 Posts

  • #5, by afrlmeFriday, 12. February 2016, 21:54 5 years ago
    Ah you are talking about a character who is following (chasing) around your currently active character? I actually wrote a script for Joe, that allowed characters following around his active character perform random animations when the active character becomes idle. I suppose you could take the same script to control both the random actions & stop them & have them resume following the active character when it starts moving again. I believe the script took care of both following & idle, then again I have bad memory & I wrote it a while ago.

    Imperator

    6842 Posts

  • #6, by afrlmeFriday, 12. February 2016, 21:54 5 years ago
    Ah you are talking about a character who is following (chasing) around your currently active character? I actually wrote a script for Joe, that allowed characters following around his active character perform random animations when the active character becomes idle. I suppose you could take the same script to control both the random actions & stop them & have them resume following the active character when it starts moving again. I believe the script took care of both following & idle, then again I have bad memory & I wrote it a while ago.

    Imperator

    6842 Posts

  • #7, by darren-beckettSunday, 14. February 2016, 16:36 5 years ago
    I already my characters performing idle actions and have the characters following each other onto new scenes.
    My problem is when the main character changes scene whilst the following character is performing their idle actions.
    That's why i need to stop any idle actions of the following character to allow them to change scene with the main character.

    I will just store which action is active and stop it on scene change, i was just hoping for a quick way of stopping all actions without having to track them myself.

    Great Poster

    351 Posts

  • #8, by afrlmeMonday, 15. February 2016, 01:49 5 years ago
    You could write a script that iterates through the active action list. I don't really recommend it though as it will literally comb through all active actions.

    I think a better solution would be to simply create a single value & assign a number to each of the idle actions & then you update the value when you trigger one of the idle actions & at the end of the action you reset it back to 0.

    The next thing would be to create a called by other action & insert some if queries into it to check if the value = x or y or z or whatever, then you only ever have to call that action block when you want to quit the following characters active action block.

    Imperator

    6842 Posts

  • #9, by darren-beckettMonday, 15. February 2016, 08:15 5 years ago
    Ok, thanks.

    Great Poster

    351 Posts

Write post