Results 1 to 5 of 5

Thread: Halting an Animation

  1. #1

    Halting an Animation

    I've got a scene where a character is playing out a speaking animation but when he gets shot, continues the animation all the way thru before dying.

    As you can see I don't yet know much about the scripting language

    Code:
     mike playmove "ActsPercMstpSnonWnonDnon_talking01a";
    _damage= getdammage mike;
    while {_damage > 0.8} do exit;
    ~The bearly literate pugilist~

    Stop discrimination! Fight for bot rights for them to thrive indoors! http://feedback.arma3.com/view.php?id=8671 -Please revote this! Previous one was mistakenly directed to DevHeaven only!

    Add Distance to Target/Gear Menus: http://feedback.arma3.com/view.php?id=8666

    Spoiler:

  2. #2
    Instead of 'do exit' (which will do nothing in an SQF file by the way), use this to stop his current animation:
    Code:
    mike switchMove "";

  3. #3
    Second Lieutenant froggyluv's Avatar
    Join Date
    Jun 19 2006
    Location
    Coloru-doo
    Posts
    4,505
    Author of the Thread
    Code:
    mike playmove "ActsPercMstpSnonWnonDnon_talking01a";
    _damage= getdammage mike;
    while {_damage > 0.8} mike switchMove "";
    He still continues his animation with this. I also tried

    Code:
    if {_damage > 0.8} then mike switchMove "";
    but still no luck.

  4. #4
    One way you can do it is put this in Mike's init field:

    Code:
    this addEventHandler ["killed",{mike switchmove "";}]

  5. #5
    Second Lieutenant froggyluv's Avatar
    Join Date
    Jun 19 2006
    Location
    Coloru-doo
    Posts
    4,505
    Author of the Thread
    Beautiful! You know trying so many things that fail and then to be given the answer really helps me to retain this stuff. I mean, it really pays to first try and find the answers, experimenting with different functions because it just seems to make more sense when somebody gives you an answer.

    Ahh, I didn't make any sense

    Thanks mate!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •