Jump to content

f2k sel

Member
  • Content Count

    4462
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by f2k sel

  1. If it's false it won't complete but it will perform the WPtype S&D, LAND, MOVE ect. The ON ACT will also not activate, when it becomes true the the WP and Action are complete. If you want a WP not perform the WP type until it becomes true you place a waypoint previous to that and set that to false. / if false wait until true and not perform on act ------- when true run on act and move to next WP / ----- move to wp then perform WP type ---- check condition ---- \ \ if true run on act and move to next WP ---------------------------
  2. Works fine for me although I used hint for message. Before the message shows the waypoint needs to complete so the searching needs to finish which can take a minute or two.
  3. Does anyone know why setformdir functions were changed in A3? With that you could rotate Turret or static weapon smoothly using setformdir, it looks like the idea was to use vehicle animateSource ["MainTurret", rad 90]; however this only seems to work for UGV. and never progressed to other vehicles or turret.
  4. f2k sel

    Arma Fixes

    I got gifted some Arma Games and DLC when the cause of random screen flashes was identified in A2, turned out to be corrupt bunnies model.
  5. It looks right but not knowing how the sides are set up I can't say for sure, sometimes things aren't worth the effort this may be one of them. one little thing that may make it look a little better would be hidebody before it's deleted _deadguy spawn { sleep 60; _Body_Vultures = [_this] execVM "scripts\crows\BodyVultures.sqf";sleep 295;hidebody _this;sleep 5;deletevehicle _this }; Basically it just sinks the unit slowly under the ground before being deleted.
  6. I thought about moving the neareastobjects then realised it needs to be updated within the script or it would only work for units there at death. I think (_x != vehicle _deadguy) could be deleted if it's no longer in the array maybe something could be done with (_deadguyside == side _x) in nearestobjects you can also do side check instead of "man" you could use "RU_Soldier" I forget the other base unit names. All the units returned would be the same side so no need to check them making the array smaller.
  7. Can't see how agents gets in, as were only looking for "man" strange. you shouldn't need any !(alive _deadguy) references as the EVH only fires if he's dead so it is redundant. I do notice you have one more _deadguy that needs replacing if ((!isNull _deadguy) AND (alive finder) AND (finder distance _deadguy < 4)) then { One thing I don't like is using several nearestobjects commands inside the while loop they are quite slow commands especially if there are a lot of units around. I wonder if it would work if they were done before the while and then just use the results.
  8. That looks like it shoiuld work, I also see another issue with the _x domove getopos _deadguy I would change that again in case _deadguy is deleted
  9. yea you still get the first error (_deadguy) because the nearestobjects is executed outside of the foreach so changing the if statement will have no effect the error has happened. Changing to finder look like it should work as long as it always exist. I did think of finding the [x,y,z] of dead guy at beginning of script and storing it in an array and then use that for the position.
  10. I don't have time right now but the error is because _deadguy doesn't exist. example using the following code with a _deadguy the code works but delete _deadguy it and you get the error. hint str (nearestObjects [vehicle _deadguy, ["Man"], 100]);
  11. They remain hidden but are returning fire and following waypoints when reveald but the crew are invisible in my tests. any how a 3am solution and there's probably a better one out there is this. { _x hideObjectGlobal false;if (_x iskindof "LandVehicle") then {{_x hideObjectGlobal false} foreach crew _x} } foreach (nearestObjects [_position, _list, (getMarkerSize _thismarker) select 0]);
  12. I've been messing with Arma stuff since OPF 2001 and still know next to nothing, if you do get A3 there is a lot more help with some very clever people. You can sort of make AI forget in A2, I found if you ungroup a unit then have it join another group it will reset it's target as long as the target is no longer visible. But if you have waypoints it will forget those as well and doing it for a whole group is difficult, unit disableAI "Target" or "AutoTarget" will limit them to what they see rather than hear. When shooting starts you restore them back to original settings
  13. I'm a dumb ass I accidentally deleted mein_debug=1; must have had it set in a units init box any way glad it works so far.
  14. It must be the way I have it set up as it's still giving me errors in _Body_Vultures all I did was change units on the map.
  15. can you post what you have, I did something and messed it up. for some reason I changed sides and started getting undefind variable in bodyvulters and that was working fine. very strange.
  16. Looks like it, so _deadguy spawn { sleep 300; deleteVehicle _this }; should be enough may be just one line _deadguy spawn { sleep 30; _Body_Vultures = [_this] execVM "scripts\crows\BodyVultures.sqf";sleep 300;deleteVehicle _this };
  17. not quite _deadguy would be _this _deadguy spawn { sleep 300; exitWith {deleteVehicle _this }; };// exitwith not needed, if it was a loop then that would work. or _deadguy spawn {_deadguy = _this; sleep 300; deleteVehicle _deadguy; }; you can't pass local variables directly, that spawned code exits on it's own and after 300 secs it will exit. It's the same as loading and running an .sqf file but it's in memory and it won't return to main code that will carry on as before. also I don't think exitwith will work but this will remove deadguy we will probably need to set avariable treu/false at that point unless BodyVultures.sqf terminates once _deadguy is removed . _deadguy spawn { sleep 300; deleteVehicle _this }; how did you end up terminating BodyVultures.sqf script before?
  18. just thinking about the crows and the loop wouldn't it be better to spawn them with a delay as soon as _deadguy dies before the while loop then you can just terminate it when you want later _deadguy spawn { sleep 30; _Body_Vultures = [this] execVM "scripts\crows\BodyVultures.sqf" };// this being the variable _deadguy passed from main script; removing the need for loopcount and maxcount stuff and as it can only ever run once.
  19. I'm not 100% sure - _remove select 0) is correct, I'll look at that as soon as I fire up pc later. It may be removing an element from _remove it's self. Agent can be a trigger and maybe (flies ect) not sure it's been a while. I'll also look at the error as it's better to know why it's failing than work around it so it can be avoided in future. Looking at the whole script I find it very confusing, what is the maxloop stuff? also while talking about arrays you can remove or add anywhere example } forEach _finders - [player]; // ect as long as it's an array I've always found Stealth mission a real pain in Arma as you have so little control of AI behaviour. They either know too much or not enough, at least in A3 you can wipe their target memory (make them forget)
  20. If there are more than one dead unit it may mess things up but if your method works for you that's fine. But what if there's more than two dead units. You could find those first and build an array of them then remove that array form finders. The next bit is untested as I'm not a main PC. _remove = [];// make an array { if (!alive _x or _x == player) then { _remove = _remove + [_x] };// fliter out unwanted stuff and place in an array } foreach ( nearestObjects [vehicle _deadguy, ["Man"], 100]);//this is the array were looking through (_finders) // then later you can remove it from finders _finders = nearestObjects [vehicle _deadguy, ["Man"], 100] - remove;// should remove all deadunits however many and player so basically create an array of all the stuff you don't want then remove it from _finders leaving just the good bits.
  21. Sadly I don't use ACE or mods but never mind. I have had chance to knock up a test script that may help Just place some units around a deadguy on fresh map an in his init put null=[this] execvm "finders_test.sqf" then save this bit of code as finders_test.sqf _deadguy = _this select 0; sleep 2; _finders = nearestObjects [vehicle _deadguy, ["Man"], 100]; player globalChat format ["all units found - %1", _finders];// retruns all units found dead or aliave sleep 2; _finders = nearestObjects [vehicle _deadguy, ["Man"], 100] - [player,_deadguy]; player globalChat format ["without player and deadguy - %1" ,_finders];// retruns all units - deadguy and player sleep 2;// the following code is used in test for finders _finders = (nearestObjects [vehicle _deadguy, ["Man"], 100] select 1); player globalChat format ["Find nearest unit - %1" ,_finders];// returns nearest unit to deadguy _finders = [_finders]; // turns out if only one item found it doesn't return as an array this does restore it as an array sleep 2; // test for _finders _numsidedeadguy = getNumber(configFile >> "CfgVehicles" >> typeOf _deadguy >> "side");// works _deadguyside = [EAST,WEST,RESISTANCE,CIVILIAN] select _numsidedeadguy;// works hint format ["original deadguyside is %1",_deadguyside];//displays deadguys original side { if ((alive _x) AND (_deadguyside == side _x)) then {player globalChat "working"} else {player globalChat "notworking"}; } forEach _finders;// if _finder and _deadguyside are the same it reports working. If deadguy was WEST and _X is WEST it should say Working ect.
  22. I would leave it as is and then look to see what _finders contains, you can then decide how to filter out what you don't want _finders = nearestObjects [vehicle _deadguy, ["Man"], 100];// may return something like [deadunit,unit a,unit b, ect]; if deadguy is always returned first and you want the closest then it would be element number 2 which is 1 or 0 if no deadguy in array. _finders = [_finders select 1];// now _finders will be an array of one unit I think., if not it may need some names changing.
  23. Looking at the last script I would start again using the above as the start, make sure it's working 100% first. However looking at original code above finder shouldn't be array, but in your script it's defined as an array finder=[]; remove it and see if it helps. that should also fix this line _shout1 = [leader (group finder), _killer] execVM "scripts\ShoutSound.sqf"; I just loaded the code in my editor and something seems off. I think it should be as follows other wise the game will try and run it. /*///////////////////////////////////////////////////////////////////////// OPFOR, once condition: this name : EHlist EHlist = thislist; {_x addEventHandler ["killed",{_this execVM "FindBody.sqf"}]} forEach EHlist; also note use of -- {_x addEventHandler ["fired",{alarm = true}]} forEach EHlist; //////////////////////////////////////////////////////////////////////////////*/ try this /* OPFOR, once condition: this name : EHlist EHlist = thislist; {_x addEventHandler ["killed",{_this execVM "FindBody.sqf"}]} forEach EHlist; also note use of -- {_x addEventHandler ["fired",{alarm = true}]} forEach EHlist; */
  24. Only got a few seconds right now but quick look shows your checking distance against an array (finders) you will need to select the element from the array if ((_LoopCount > 14) && (_LoopCount < 16) && !(isNull _deadguy) AND ((finder select 0) distance _deadguy < 20)) then { However it's not gong to help as the whole script is a mess a mixture of arrays being used as simple variable. here is another, finder is an array but your trying address it as a group but finder may be several units in different groups. _shout1 = [leader (group finder), _killer] execVM "scripts\ShoutSound.sqf"; // Error group: Type Array, expected Are you sure you need to make arrays it looks like the code was mostly for a single unit, changing nearestobjects to the nearestobjet command may work better as it would return the nearest unit. and remove all the finder and _finders arrays and keep them simple variables containing the nearest unit. I'm not sure why this fails, memory isn't what it used to be. _finders = nearestObjects [vehicle _deadguy, ["Man"], 200]; // Error 0 elements provided, 3 expected //50 to 300 the three elements it's looking for are xyz of the deadguy, may be this _finders = nearestObjects [getpos (vehicle _deadguy), ["Man"], 200]; // Error 0 elements provided, 3 expected //50 to 300 but again it's returning an array, do you need to find all the units or just the nearest? Good luck.
  25. (!all) doesn't seem to be defined but _all is so try (!_all) yes minflloors looks a little messed up aswell
×