Jump to content

Kunsa

Member
  • Content Count

    86
  • Joined

  • Last visited

  • Medals

Everything posted by Kunsa

  1. Kunsa

    OnMissionLoaded

    Thanks for both of the replies. The event handler was exactly what i was looking for. :)
  2. been a while since i have played around with arma, and was trying to work out how and where you check when the mission has loaded. I want to run some code but only when a mission has been loaded from a savegame, not when the mission is started for the first time... thx in advance.
  3. Kunsa

    Make AI sprint

    I made a mod for myself back in arma2 that I inserted into the menu which made my grunts sprint. I had to silently move them into a new group,disableAI everything,never fire, set a waypoint, tell them to run there, rejoin the players group and then reenable it all at the end of the run so they wouldnt get caught up looking at something. (they used to do this kind of chicken dance when someone was shooting at them). It worked well when you just needed them to stop mucking around and just run.
  4. Hi all, Just getting back into arma 3 again hopefully will be patched once I get a bit more data allowance. I have been thinking of making an explosives panel for detonating individually placed mines etc. So i can reference the object when its placed but I was wondering if there is a way to search an area, collect a reference to all nearby mines in an array and then somehow find out who owns those mines and dynamically add them to my panel. I'm just not sure how I would find who owns what?! it probably a simple solution but I just thought asking would be faster... Any thoughts?
  5. Kunsa

    Wilhelm Scream

    Haha classic. +1
  6. This sounds great.. look forward to seeing where this goes. Would be nice if it could be used on ai as well.
  7. I had the same problem(with a quadbike). I thought the vehicle was supposed to lose its side status as soon as you dismount, but it seems not to. I just ended up hiding the vehicle, but I would like to know if theres a simple fix for this too.
  8. or maybe this will help.. setGroupIconsVisible [false,false];//[show markers on map, show markers on player hud]
  9. A bit late to join in but if you speed up the animation and if your using setvelocity you could make the animations look correct without having to change them. So i think its a viable method but only for specific uses like short burst extreme sprinting or such
  10. Kunsa

    save gear

    this might work.. player init or anywhere: nul = player addaction ["Save Loadout","saveLoadout.sqf"]; /* in Init.sqf */ globalRespawnLoadout = []; /* SaveLoadout.sqf */ //[target,caller,id,arg] (_this select 0) removeaction (_this select 2); hint "Loadout saved."; globalRespawnLoadout = [ uniform player, vest player, backpack player, headgear player, magazines player, weapons player, primaryWeaponItems player, secondaryWeaponItems player, handgunItems player, items player, assignedItems player, goggles player ]; /* onPlayerRespawn.sqf */ _new = _this select 0; _old = _this select 1; //check if gear saved and load it if (count globalRespawnLoadout > 0) then { removeAllAssignedItems _new; removeAllItems _new; removeAllWeapons _new; removeUniform _new; _new addUniform (globalRespawnLoadout select 0); removeVest _new; _new addVest (globalRespawnLoadout select 1); removeBackpack _new; _new addBackpack (globalRespawnLoadout select 2); removeHeadgear _new; _new addHeadgear (globalRespawnLoadout select 3); {_new addMagazine _x} forEach (globalRespawnLoadout select 4); {_new addWeapon _x} forEach (globalRespawnLoadout select 5); {_new addPrimaryWeaponItem _x} forEach (globalRespawnLoadout select 6); {_new addSecondaryWeaponItem _x} forEach (globalRespawnLoadout select 7); {_new addHandgunItem _x} forEach (globalRespawnLoadout select 8); {_new addItem _x} forEach (globalRespawnLoadout select 9); {_new addItem _x} forEach (globalRespawnLoadout select 10); {_new assignItem _x} forEach (globalRespawnLoadout select 10); removeGoggles _new; _new addgoggles (globalRespawnLoadout select 11); };
  11. even if we didn't get a ragdoll command (which would be difficult to transition out of), putting a fall down animation or a death animation back in, would be simple as they would have them on backup somewhere. thats where my vote would go.
  12. interesting.. I wonder if you could run through the entire road network once and using near roads, build an array of patches like a lookup table to tell broken segments where to go(as long as there is another road segment within a certain distance). then you would only need roadsConnectedTo making all subsequent calls faster. you could run that once and then copytoclipboard and copy it to a file to #include in your code (i wonder how big a file like that would be...and how many broken segments there are) I haven't looked at this yet. what sort of algorithm are you using? Is it using the corners of roads as nodes or are you using each road peice as a node? edit: I just had a look... very nice work. must have taken you a while
  13. when a unit dies, it changes side from whatever to civilian. not sure why. maybe to stop ai firing at it after its dead. that just means it is a bit trickier to check for dead opfor without a bit more complex check.. this just checks for anyone dead within the trigger area : {thistrigger distanceSqr _x < (2500)} count alldead > 0 ; just change the 2500 to whatever size you have set for your trigger area. the number is the square of trigger size ... i.e. size 50 = 50*50 = 2500. I havent tried it, but I wonder if you could join you civilians into a blufor group if that would change anything. for example: init.sqf: EAST setFriend [CIVILIAN, 0]; CIVILIAN setfriend [EAST, 0]; guerrillas = group this; //init on unit spawn then trigger onActivation: rebels = creategroup west; {_x setcaptive false} foreach units guerrillas; (units guerrillas) joinsilent rebels; deletegroup guerrillas; you wouldn't need to spawn the blufor team leader that way
  14. not sure what the answer is for the civs... I think once you set setcaptive true in front of some troops, even if you set it back, those troops dont recognize it(other troops you meet later on will fire on you) if your civs set setcaptive false and then fired on the opfor then opfor would attack the civs.. looking at the above, I didn't set the position in the above code... after testing it, I noticed there isnt a really good transition animation from this to death... but at least it works this time. you don't need to add an AI this time, just place a trigger, name it and insert the name into the code and then put it in the onAct field nul = [] spawn { private "_dyingGuy"; "b_soldier_f" createUnit [getPos NAMEOFYOURTRIGGER, creategroup WEST, "this setcaptive true; this setdamage 0.7;this switchMove ""acts_InjuredLookingRifle02""; _dyingGuy = this"]; _dyingGuy disableAI "MOVE"; waitUntil {player distance NAMEOFYOURTRIGGER < 5}; _dyingGuy lookAt player; sleep 2; _dyingGuy sidechat "*sputters*.. Its a Trap!"; sleep 2; _dyingGuy SwitchMove "AinjPpneMstpSnonWrflDb_death"; _dyingGuy setDir (getDir _dyingGuy +180) mod 360; _dyingGuy setDamage 1; };
  15. what ^ he said... or at the least enclose your statements inside a "nul = [] spawn {}" construct... some expressions expect code and some expect strings.. and some of them expect a filename. So I think your inline code is the problem.
  16. I think you are looking for setVehicleVarName
  17. there is: scriptName "Functions\geometry\fn_relativeDirTo.sqf"; /************************************************************ Relative Direction To By Andrew Barron Parameters: [object 1, object or position 2] Returns the relative direction from object 1 to object/position 2. Return is always 0-360. A position to the right of unit would be at a relative direction of 90 degrees, for example. Example: [player, getpos dude] call BIS_fnc_relativeDirTo ************************************************************/ if your result are opposite what you want, you can just subtract 180 from the angle and adjust if necessary _angle = _angle - 180; if (_angle < 0) then {_angle _angle + 360}; I'm not sure if there is any way you can update UI elements as fast as Draw3D
  18. or you can use removeuniform / adduniform and put civilian clothes on your blufor units
  19. yea thats my guess... a visual guide for unit spacing and such(havent played campaign yet so not sure what happens there)
  20. onAct: nul = [] spawn { _dyingGuy = ObjNull; "b_soldier_f" createUnit [_position, creategroup WEST, format["this setcaptive true; this setdamage 0.7;this switchMove ""acts_InjuredCoughRifle02""; %1 = this",_dyingGuy]]; waitUntil {player distance _dyingGuy < 5}; _dyingGuy lookAt player; sleep 1; _dyingGuy sidechat "*sputters*.. Its a Trap!"; sleep 2; _dyingGuy setDamage 1; }; :) I keep thinking of Family Guy... I didnt quite understand your second question.
  21. Haha this sounds cool.. You don't need a purpose if your having fun !!
  22. I think there are 3 different levels of setunitPos... the weakest is setunitposweak or something like that. the second is setunitPos which will override any setunitposweak command and the third is when your character sets unitpos through the menu...actually in-game. That one overrides the scripting command setunitPos. So if you use the menu to command someone to a position and then use the scripting command it doesnt always work as expected. Im sure someone will tell me if i'm wrong on this, but I think thats right. I just remember having problems when in combat.. getting the unit up and running was difficult. To change their combat mode etc I had to remove them from my group silently and then issue the command for it to work(because combatmode and others are group commands) but that is when I was changing stance, and it worked for me.. you could try that?!
  23. Kunsa

    execVM question

    yea that too... but then you can't have a sleep in test.sqf
  24. just copy/paste that script into your init.sqf and thats it.
  25. Sorry I haven't read through all the posts, but I was wondering if there is a config file that can be modified (ingame?) to suppress some options. for example if I want it to show only ammo when I spawn it at one location on the map and only weapons at another? and another thing I was thinking about was if there was a way to get a list of what was removed and what was taken... on a closedialog event or something? I just recently acquired this script/mod in a downloaded mission and I am just playing around with it now. I thought it would be faster to ask on the forums. thx in advance :)
×