SaOk 112 Posted December 1, 2010 Is there a way to stop this function working? After spawning crows with it, I can delete the birds with: {deletevehicle _x;} foreach bis_crows; But it spawns always new birds fill up the parameter number. I saw the function using some new fsm file from modules_pmc, but I cant open it with Total Commander. :S I would like to have crows flying over random bodies and the disappearing later when player is far, so they could fly over some other random dead body. Keeping the total bird count low. :j: http://community.bistudio.com/wiki/BIS_fnc_crows Share this post Link to post Share on other sites
TRexian 0 Posted December 1, 2010 Not sure, but there has been at least one implementation that has birds as particles, which would have a very minimal fps hit. Oh, and thanks for the link! :) I hadn't looked at all the new functions yet. Birds... flies... sandstorm.... I think someone at BI was inspired by DMarkwick's work. ;) Share this post Link to post Share on other sites
panda123 10 Posted December 1, 2010 good for you if you can use the BIS fnc crows, I've tried to put this in an init file //--- Environment ["destroyCenter"] call bis_fnc_destroyCity; ["ca\missions_pmc\data\ui_gps_ca.paa",-0.05,0.16] call bis_fnc_customGPS; //_crows = ["crows"] call bis_fnc_crows; bis_crows = [bIS_scientist,20,8,20] call bis_fnc_crows; [player,-1,0.8] call bis_fnc_sandstorm; //--- Artillery { _x spawn { _player = _this; _otherPlayer = (BIS_players - [_player]) select 0; while {true} do { waituntil {isplayer _player}; _dirToPlayer = [_player,_otherPlayer] call bis_fnc_dirTo; _pos = [position _player, 50 + random 20, _dirToPlayer + 90 + random 180] call BIS_fnc_relPos; if (_player distance _otherPlayer > 777 && lifestate _player == "ALIVE") then {_pos = position _player;}; _posGround = +_pos; _pos set [2,1000*0.5]; if (_posGround distance bis_dixon > 100 && _posGround distance bis_ka > 300) then { _shell = /*"R_57mm_HE"*/"ARTY_Sh_82_HE" createvehicle _pos; _shell setdir 90; [_shell,-90,0] call bis_fnc_setpitchbank; _shell setvelocity [0,0,-444/2]; }; [objnull,objnull,rPLAYSOUND,format ["PMC_Incoming%1",1 + floor random 2]] call re; _delay = 10 + random 10; sleep _delay; }; }; } foreach BIS_players; and placing logics or markers but without success. Wiki is not clear to understand. If someone have found a solution please heeelp :bounce3: Share this post Link to post Share on other sites
rok 0 Posted December 1, 2010 panda123, did you add Functions Library module in editor. Also remeber to check that functions are initialized waituntil {!isnil "bis_fnc_init"}; Share this post Link to post Share on other sites
panda123 10 Posted December 1, 2010 (edited) ok thanks I've forgotten "waituntil {!isnil "bis_fnc_init"};" all new functions are working fine but the arty ... :p Edited December 1, 2010 by panda123 Share this post Link to post Share on other sites
HitmanFF 6 Posted December 1, 2010 Is there a way to stop this function working? I've taken a look at the function, and for each crow a fsm is started. In this fsm there is a specific check whether the crow still exists. If not, a new crow is created. There is also no end state for the fsm, so afaik there's no way of stopping the birds... Share this post Link to post Share on other sites
SaOk 112 Posted December 1, 2010 (edited) I've taken a look at the function, and for each crow a fsm is started. In this fsm there is a specific check whether the crow still exists. If not, a new crow is created. There is also no end state for the fsm, so afaik there's no way of stopping the birds... Could you send me the fsm file? I could try to modify it to work in better way. For some reason I cant open PMC pbo files with Total Commander. Is there a better pbo "codec" for it, or what unpack programm are you using? Edited December 1, 2010 by SaOk Share this post Link to post Share on other sites
moricky 210 Posted December 1, 2010 Birds are not serialized and after game load, crows would disappear. This simple solution will create them again. Share this post Link to post Share on other sites
panda123 10 Posted December 1, 2010 I've got an fsm but I don't know if it's the good one you are looking for http://rapidshare.com/files/434331550/flow.fsm I've edited the PMC pbo files with notepad. Hope it helps you :) Share this post Link to post Share on other sites
SaOk 112 Posted December 1, 2010 (edited) Thats sensible, but the current function fits only in smaller missions as more static detail. I would want to have those in massive mission with much spawning/deleting units. So randomly dead bodies would have those crows flying over them, before dissapearing after timeout and player at safe distance. Edit: Thank you, but is that the right file? That looks like task-script for some mission. Edited December 1, 2010 by SaOk Share this post Link to post Share on other sites
panda123 10 Posted December 1, 2010 yes you are right I messed up It comes from the first mission here the complete mission_PMC http://rapidshare.com/files/434334719/fsm.txt open with notepad what you are looking for is somewhere :) Share this post Link to post Share on other sites
SaOk 112 Posted December 1, 2010 (edited) Okay, thanks. I am almost finding it. Tried to copy the code for wordpad, but still something wrong to get it work. Its close. :) Edit: And it works now. Thanks again. Opening the pbo files with wordpad really is a good tool. :) Edit2: And now I have the dynamic crow-system working. Only needed to change the fsm, very slightly. Edited December 1, 2010 by SaOk Share this post Link to post Share on other sites
soldier2390 0 Posted August 29, 2011 Sorry if I break any forum rules but I am having a problem getting the "BIS fnc Crows" to work! I dont really understand much of what the BIS Wiki says, and not sure if i totally understand..if at all, what im doing with it this Crows Function! Here is what I have in my init.sqf waitUntil{!isNil "BIS_fnc_init"};if (time < 10) then { titleCut ["", "BLACK FADED", 999]; [] Spawn {waitUntil{!(isNil "BIS_fnc_init")}; // Info text [str("NATO Air Base, Takistan - 2011") , str(date select 2) + "." + str(date select 1) + "." + str(date select 0), str("Lock & Load...")] spawn BIS_fnc_infoText; sleep .1; "dynamicBlur" ppEffectEnable true; "dynamicBlur" ppEffectAdjust [6]; "dynamicBlur" ppEffectCommit 0; "dynamicBlur" ppEffectAdjust [0.0]; "dynamicBlur" ppEffectCommit 7; titleCut ["", "BLACK IN", 5] }; }; _crows = [position deadBody,20,8,20] call bis_fnc_crows; [position deadBody,0.05,1.5] call bis_fnc_flies; ["DestroyVillage",300,42,[bis_vila]] call bis_fnc_destroyCity; ["ca\missions_pmc\data\ui_gps_ca.paa",-0.05,0.16] call bis_fnc_customGPS; [player,Southern_Airport_Loc,[0.706,0.0745,0.0196,1]] call bis_fnc_dirIndicator; [player,-1,0.8,true] call bis_fnc_sandstorm; My problem is what I am trying to do is have these Crows spawn if possible randomly around any dead body with in my position, so that way in a mission i can look up and see the nearest dead body. But without having to place a marker or something! I may be completly wrong but isnt "Position deadBody" an array? If not can someone explain more about what the BIS Wiki means by it and how it was set up in the PMC Missions init.sqf i looked tho? Same with the flies? Share this post Link to post Share on other sites
SaOk 112 Posted September 3, 2011 (edited) Hi, you need to name a unit as deadBody to get that work. If you want crows and flies over each real dead body. Then use it like this: {_crows = [position _x,20,8,20] call bis_fnc_crows; [position _x,0.05,1.5] call bis_fnc_flies;} foreach allDead; Or with randomness: { if (random 1 < 0.5) then {_crows = [position _x,20,8,20] call bis_fnc_crows;}; if (random 1 < 0.5) then {[position _x,0.05,1.5] call bis_fnc_flies;}; } foreach allDead; Edit: Remember to have function module placed on map. Also the functions dosent work until about after 3 seconds from mission start. So you need to use that waitUntil{!isNil "BIS_fnc_init"}; or add sleep 3. Edited September 3, 2011 by SaOk Share this post Link to post Share on other sites
odyseus 19 Posted July 27, 2012 yes you are right I messed up It comes from the first missionhere the complete mission_PMC http://rapidshare.com/files/434334719/fsm.txt open with notepad what you are looking for is somewhere :) Hey panda do you still have that code? what was the solution you come up with, since crow cant be deleted?. Thx brow ---------- Post added at 07:21 PM ---------- Previous post was at 05:40 PM ---------- What about you SaOK, Do you have that solution ?? Share this post Link to post Share on other sites
SaOk 112 Posted July 28, 2012 Sure, I use these two slightly modified orginal scripts (Crow.sqf and CrowsM.fsm): http://www.gamefront.com/files/22046588/Crows.7z Have this is init.sqf: FUNKTIO_CROW=compile preprocessfileLineNumbers "Crows.sqf"; Then launch it for wanted objects (units) like this (replace _num with number - its the amouth of spawned crows): _bis_crows = [_unit,20,_num,20] CALL FUNKTIO_CROW; And you can then delete the crows e.g. like this: while {((vehicle player) distance _pos < 400) && ({isnull _x} count _bis_crows == 0)} do {sleep 5;}; {if (!isnull _x) then {deletevehicle _x;};} foreach _bis_crows; _bis_crows includes the spawned crows that turn into null after loading a savegame. Let me know if you face problems. I made the crows to arrive from far instead of spawning them over the body instantly. Share this post Link to post Share on other sites
Sarge 1 Posted April 3, 2013 sry to revive an old post, but does anyone still have these 2 files ? Sa0k are you still active here ? Share this post Link to post Share on other sites
SaOk 112 Posted April 3, 2013 Sure, here is the two files (Crow.sqf and CrowsM.fsm): :) https://www.dropbox.com/s/fwijf63mpv5txcn/Crows.7z Share this post Link to post Share on other sites
lordprimate 159 Posted March 12, 2017 The necromancing continues. SaOk, can i use this in a mod? Share this post Link to post Share on other sites