froggyluv 2136 Posted December 12, 2017 Using the example provided by the WIKI Quote [this,"SIT2"] call BIS_fnc_ambientAnim; 0 = this spawn {waitUntil {behaviour _this == "combat"}; _this call BIS_fnc_ambientAnim__terminate;} Works great when placed into individual map placed units but Id like to have the ability to have master control over the whether they spawn in mass or just walk into a certain area. A. _this = _this select 0; [_this,"SIT2"] call BIS_fnc_ambientAnim; 0 = _this spawn waitUntil {behaviour _this == "combat"}; [_this] call BIS_fnc_ambientAnim_terminate; Doesnt Work B. {[_x "SIT2"] call BIS_fnc_ambientAnim; 0 = [_x] spawn {waitUntil {behaviour _x == "combat"}; [_x] call BIS_fnc_ambientAnim_terminate}} foreach thisList Also getting Undefined errors on this. Share this post Link to post Share on other sites
johnnyboy 3793 Posted December 12, 2017 11 hours ago, froggyluv said: _this = _this select 0; [_this,"SIT2"] call BIS_fnc_ambientAnim; 0 = _this spawn waitUntil {behaviour _this == "combat"}; [_this] call BIS_fnc_ambientAnim_terminate; Hello there my stylin' 70s amphibian brother... I'm not sure what your issue is, but see 2 odd things. _this = _this select 0; // Is it a good idea to override the _this input parameter like that? And your terminate call is not within the spawn brackers {}, so it looks to me like anim is terminated immediately (its not waiting for the spawned behaviour check). Share this post Link to post Share on other sites
froggyluv 2136 Posted December 12, 2017 Hey JDawg -yeah sorry was pretty sloppy late nite ^^ So pretty much what Im tryna do is have a base full of soldiers with different animations that switch off when Danger mode comes in. They have a Combat Animation type in which they already do that but the list is very small Share this post Link to post Share on other sites
pierremgi 4862 Posted December 12, 2017 Too much [ ] ! _this refers to a single unit (here) No need to wrap it in [ ] then ask for _this select 0 (first element of the array) [_this] is useless, because _this is always the whole parameter(s) (unique or array) . As you can see in workable example: _this is OK. this (without underscore) is a "magic" variable referring to the object/unit and wrote in its init field. _x is also a specific variable inside a forEach loop. You can: { _x spawn {some code with _myLocalThing = _this (as passed parameter) ... } } forEach (an array); 1 Share this post Link to post Share on other sites
johnnyboy 3793 Posted December 12, 2017 1 hour ago, froggyluv said: Hey JDawg -yeah sorry was pretty sloppy late nite ^^ Dude, remember: Don't drink and code. Don't drink and post. Lessons the old JDawg had to learn the hard way... 1 Share this post Link to post Share on other sites
cosmic10r 2331 Posted December 12, 2017 36 minutes ago, johnnyboy said: Dude, remember: Don't drink and code. Don't drink and post. Lessons the old JDawg had to learn the hard way... Nobody can hold Frogs down 2 Share this post Link to post Share on other sites
johnnyboy 3793 Posted December 12, 2017 1 hour ago, cosmic10r said: Nobody can hold Frogs down Since we know froggy luvs frogs, and is known to hoist a brew from time to time, I wonder if he is actually the "Fink" in real life? Is this the real FroggyLuv: https://www.youtube.com/watch?v=CA965uKhVk4 1 Share this post Link to post Share on other sites
cosmic10r 2331 Posted December 13, 2017 You will have to wait for Ego mod... it has a picture of me and Frogs in the backstreets of Kavala... repping for all the Gangstarrs ;) 1 Share this post Link to post Share on other sites
froggyluv 2136 Posted December 13, 2017 @pierremgi as usual i was overcomplicating things unknown syntax tends to do that to me So in the Debug: {IF (side _x == east) then {[_x, "SIT", "light"] call BIS_fnc_ambientAnim;}} foreach allunits; { _x spawn Frog_TerminateMeArnold} forEach allUnits Frog_TerminateMeArnold = { waitUntil {behaviour _this == "combat"}; _this call BIS_fnc_ambientAnim__terminate }; Is working!! Obviously AllUnits will be slimmed down and a sleep added but just wanted to get it up and running. Thanks again man I dont always get your stuff at first but it usually sends me down the right direction. @BunchaMooks: Cmon guys Im way studlier than that think.... lol just watched that Fink video - disturbing yet mildly arousing...?...Beerfest haha takes me back to Super Troopers 2 Share this post Link to post Share on other sites