Aodan 10 Posted December 16, 2010 (edited) Hey everyone, I have been making a live base, and It has a lot of animations going. I have been using this script: _unit = _this select 0; _anim = _this select 1; while{alive _unit}do{ _unit playMove _anim; waitUntil{animationState _unit != _anim}; }; And calling it with: 0 = [this,"WhateverAnimationHere"] execVM "animLoop.sqf"; It has been working so far, but when I try some animations like: LHD_midDeck Where the guy is talking and looking to his right, it doesn't even want to play. I do it the traditional way (Make a trigger, add "this switchmove "animation", make a waypoint add "this switchmove "animation") and it works fine, but it doesn't loop. I tried this to see if it would loop: animLoop = {_unit = _this select 0; _anim = _this select 1; while{alive _unit}do{_unit playMove _anim; waitUntil{animationState _unit != _anim}}} And then put this in the waypoint and trigger: 0 = [this,"WhateverAnimationHere"] spawn animLoop And it still doesn't play. Any ideas? Edited December 16, 2010 by Aodan Share this post Link to post Share on other sites
AZCoder 922 Posted December 17, 2010 I take some script errors if I run animLoop. It is missing 3 semicolons. Here is the corrected version, sorry the style is different, just easier for me :) animLoop = { _unit = _this select 0; _anim = _this select 1; while{alive _unit} do { _unit playMove_anim; waitUntil {animationState _unit != _anim}; }; }; Anyway, it's the last 3 end braces. Also if you're not doing it, you can pass -showScriptErrors in the command line with Arma when it loads. Share this post Link to post Share on other sites
Aodan 10 Posted December 20, 2010 Thanks mate testing that out right now. Hoping that'll fix it, but I didn't change the script at all. I could run it fine with some of the other animations. maybe I changed something accidentally. Thanks a bunch! ---------- Post added at 09:23 PM ---------- Previous post was at 09:21 PM ---------- Oh and sorry I'm a bit of a newbie with the scripting but do I put animLoop= at the beginning or just whatever comes after? Share this post Link to post Share on other sites
AZCoder 922 Posted December 20, 2010 animLoop is fine the way you have it, that creates a function which you can call wherever.... if I'm understanding the question. You don't look like a newbie with those scripts :) Share this post Link to post Share on other sites