deadlyhabit
Member-
Content Count
48 -
Joined
-
Last visited
-
Medals
Everything posted by deadlyhabit
-
Applying Vehicle Respawn Script to all vehicles
deadlyhabit replied to GIJaneDoe's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Yea or if you could just link the thread with that script so I could take a quick gander. What should work is veh = [Chopper1, Chopper2, etc] execVM "vehicle.sqf"; -
Applying Vehicle Respawn Script to all vehicles
deadlyhabit replied to GIJaneDoe's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Can you post the script you're using already and are all your vehicles named? -
Applying Vehicle Respawn Script to all vehicles
deadlyhabit replied to GIJaneDoe's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Well the easiest way would be to make it in a .sqf file since you're going to have to create an array for your vehicles. -
Applying Vehicle Respawn Script to all vehicles
deadlyhabit replied to GIJaneDoe's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You could do it as a command to an array of your vehicles ie: {command object} forEach [vehicle array]; Take a look here http://community.bistudio.com/wiki/forEach -
Yes haha had a brainfart for the proper term, PiP. Was actually debating attempting it then I saw your script here.
-
Do you think this could possibly implemented into say one of the side panel "monitors" or surfaces (don't know what to exactly call them)? The separate video surfaces you can use for say helmet cams to view what other troops are doing, vehicle weapon optics, vehicle mirrors etc.
-
Removing Pilots and Co-Pilots on spawn
deadlyhabit replied to GIJaneDoe's topic in ARMA 3 - MISSION EDITING & SCRIPTING
If you didn't already figure it out, go to EMPTY for your factions while in unit menu :cool: -
Equiping Night Vision and Rebrether On Spawn - Need Help Plz!
deadlyhabit replied to Phonix644's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Funnily enough this assignItem "NVGoggles"; is working for me now, for some reason it wouldn't last night, maybe I did something wrong due to lack of sleep. It also corrects the bug found above (at least I'm assuming it's a bug). http://i.imgur.com/gRgPSmt.png http://i.imgur.com/170HMtr.jpg -
Cessna 185 Skywagon - Light Aircraft
deadlyhabit replied to [aps]gnat's topic in ARMA 3 - ADDONS & MODS: COMPLETE
The GETOUT waypoint isn't landing it for some reason even on the airfield. Maybe it isn't defined as an airfield as of yet or plane functions just aren't ready at this stage in the alpha? Out of curiosity how could you define a runway at sea in theory if you know how. Cheers! -
Equiping Night Vision and Rebrether On Spawn - Need Help Plz!
deadlyhabit replied to Phonix644's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Just tried that and funnily enough it just put's the unit in Night Vision mode (fullscreen instead of the circle as well oddly enough), even without NVGs in inventory. Pics for proof http://i.imgur.com/yOaiAvD.png http://i.imgur.com/PHrZ5iv.jpg Your direct player action ["NVGoggles", player]; and substituting this with both player bits yields the same results as well -
Equiping Night Vision and Rebrether On Spawn - Need Help Plz!
deadlyhabit replied to Phonix644's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Can I ask you how you got them to spawn in with the NV goggles on? I have no problem getting them into a divers inventory, but assignItem doesn't seem to force them to the proper slot. -
Cessna 185 Skywagon - Light Aircraft
deadlyhabit replied to [aps]gnat's topic in ARMA 3 - ADDONS & MODS: COMPLETE
Has anyone been able to use waypoints or any form of scripting to have an AI controlled unit land either on land or in the case of the amphibious, in water? Great work btw, loving this plane. -
Random spawn positions for AI???
deadlyhabit replied to Lucky44's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Haha I've been programming for close to 18 years now, just always fun tackling a new challenge, especially when it comes to scripting. -
Random spawn positions for AI???
deadlyhabit replied to Lucky44's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Yea just added those in as well, thank you guys for your patience and help so much. Got what I wanted running properly now! -
Random spawn positions for AI???
deadlyhabit replied to Lucky44's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Haha, thanks again man. I swear I wish there was better documentation for the scripting (or someone to explain why it doesn't work), as the wiki seems to be misleading me, it seems so finicky with things that "should" work. Now correct me if I'm wrong, but say If I wanted to contain my hostage conditions in a separate script file all I would have to do is this? H1 = groupHostage createUnit ["GUE_Soldier_MG", _markerPos, [execVM "scriptName.sqf";], 0, "FORM"]; Or does that not work with createUnit_array? -
Random spawn positions for AI???
deadlyhabit replied to Lucky44's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Did that and H1 is still spawning with a weapon and pretty sure not getting marked as captive -
Random spawn positions for AI???
deadlyhabit replied to Lucky44's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Alright I've run into a new headache, I'm trying to spawn in an unarmed captive along with the enemy AI that is going to be rescued, but for some reason my script isn't working... I swear this is almost as much of a pain as doing ASM ///////////////////////////////////////////////////////// // Randomize placement of a group within 6 spots // gue_random6.sqf ///////////////////////////////////////////////////////// if (! isServer) exitwith {}; // NOTE: in multiplayer, only server should create random numbers. // Create Group for units to be spawned into; must have group created BEFORE spawning units in. groupAlpha = createGroup east; groupHostage = createGroup resistance; _SideHQ = createCenter east; _SideHQ1 = createCenter resistance; // Pick Location /////////////////////////////////////////////////////////////////////// _markerPos = getMarkerPos format ["markerA%1",round ((random 6) + 0.5)]; // Show Enemy Spawn Location as a GPS Coord in Hint _gridPos = mapGridPosition _markerPos; hint format ["Position %1", _gridPos]; //Generate Hostage H1 = "GUE_Soldier_MG" createunit [_markerPos, groupHostage]; groupHostage selectLeader H1; H1 disableAI "MOVE"; H1 removeAllWeapons; H1 setCaptive true; //Generate Soldiers G1 = "GUE_Soldier_CO" createunit [_markerPos, groupAlpha]; G1 setdir 360; G2 = "GUE_Soldier_MG" createunit [_markerPos, groupAlpha]; G2 setdir 90; G3 = "GUE_Soldier_GL" createunit [_markerPos, groupAlpha]; G3 setdir 180; G4 = "GUE_Soldier_AT" createunit [_markerPos, groupAlpha]; G4 setdir 270; -
Random spawn positions for AI???
deadlyhabit replied to Lucky44's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Heh yea I'm already past it, it's just one of those cases of damn it, it should work and I need to know why it doesn't. It's the boon of a programmer's mind. -
Random spawn positions for AI???
deadlyhabit replied to Lucky44's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
No the markers are properly named, I think it has something to do with the syntax of the _markerPos = getMarkerPos function call. That seems to be where the problem is coming in, and I'm honestly stumped as to what's wrong with it. Kind of thankful as well as it cut down the amount of scripting quite a bit. -
Random spawn positions for AI???
deadlyhabit replied to Lucky44's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I'm not so sure about that, using the following script to generate all my enemies with just 6 markers and setting Independents to hostile in the actual mission editor has them engage me when I approach and normal behavior ///////////////////////////////////////////////////////// // Randomize placement of a group within 6 spots // gue_random6.sqf ///////////////////////////////////////////////////////// if (! isServer) exitwith {}; // NOTE: in multiplayer, only server should create random numbers. // Create Group for units to be spawned into; must have group created BEFORE spawning units in. groupAlpha = createGroup RESISTANCE; // Pick Location /////////////////////////////////////////////////////////////////////// _markerPos = getMarkerPos format ["markerA%1",round ((random 6) + 0.5)]; // Show Enemy Spawn Location as a GPS Coord in Hint _gridPos = mapGridPosition _markerPos; hint format ["Position %1", _gridPos]; //Generate Soldiers G1 = "GUE_Soldier_CO" createunit [_markerPos, groupAlpha]; G1 setdir 360; G2 = "GUE_Soldier_MG" createunit [_markerPos, groupAlpha]; G2 setdir 90; G3 = "GUE_Soldier_GL" createunit [_markerPos, groupAlpha]; G3 setdir 180; G4 = "GUE_Soldier_AT" createunit [_markerPos, groupAlpha]; G4 setdir 270; -
Random spawn positions for AI???
deadlyhabit replied to Lucky44's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Ok maybe you or someone else can indulge my curiosity. Your script line of: _markerPos = getMarkerPos format ["markerA%1",ceil (random 6)]; works perfectly fine While : n1 = round ((random 6) + 0.5); // generates random number from 1 to 6 switch (n1) do { case 1: {_markerPos = getMarkerPos "marker1"}; case 2: {_markerPos = getMarkerPos "marker2"}; //etc... }; doesn't seem to work besides the random number generation and case calls (tested that by using hint calls for each case instead of the _markerPos calls) While I'm grateful as hell for the solution you presented, I have to to know (sorry I'm a programmer by trade) what's wrong with the example that doesn't work to help me learn more and hopefully avoid mistakes in the future. Also what would be the correct format for displaying a variable as a hint? Would it be: hint format ["Position %1", _markerPos]; -
Random spawn positions for AI???
deadlyhabit replied to Lucky44's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thanks for the the responses, going to take a look at DAC in the morning. I guess one of the things I want to know is why xPaveway's script doesn't run properly. I've been banging my head against my keyboard and checking the syntax for all the bits in it to no avail, it seems like it's all properly formatted and should run just fine. ---------- Post added at 08:02 ---------- Previous post was at 08:01 ---------- Unfortunately I do need them to have names for the mission I'm working on. -
Random spawn positions for AI???
deadlyhabit replied to Lucky44's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Alright I hate to bump an old ass thread, but I've been trying the scripting given in this thread. The problem being the script by Lucky44 works just fine, but is inefficient from a coders point of view. The script given xPaveway for some reason doesn't work, and for the life of me I can't figure out why. I'm guessing it has something to do with _markerPos = getMarkerPos "marker1" etc, but I can't figure out what is wrong in the syntax to fix it. I've even tried my own combination of the 2 scripts to no avail and could really use some help. ///////////////////////////////////////////////////////// // Randomize placement of a group within 6 spots // gue_random6.sqf ///////////////////////////////////////////////////////// if (! isServer) exitwith {}; // NOTE: in multiplayer, only server should create random numbers. // Create Group for units to be spawned into; must have group created BEFORE spawning units in. groupAlpha = createGroup RESISTANCE; // Pick Location /////////////////////////////////////////////////////////////////////// n1 = round ((random 6) + 0.5); // generates random number from 1 to 6 if (n1 == 1) then { hint "1"; _markerPos = getMarkerPos "markerA1"; }; if (n1 == 2) then { hint "2"; _markerPos = getMarkerPos "markerA2"; }; if (n1 == 3) then { hint "3"; _markerPos = getMarkerPos "markerA3"; }; if (n1 == 4) then { hint "4"; _markerPos = getMarkerPos "markerA4"; }; if (n1 == 5) then { hint "5"; _markerPos = getMarkerPos "markerA5"; }; if (n1 == 6) then { hint "6"; _markerPos = getMarkerPos "markerA6"; }; G1 = "GUE_Soldier_CO" createunit [_markerPos, groupAlpha]; G1 setdir 180; G2 = "GUE_Soldier_MG" createunit [_markerPos, groupAlpha]; G2 setdir 180; G3 = "GUE_Soldier_GL" createunit [_markerPos, groupAlpha]; G3 setdir 180; G3 = "GUE_Soldier_AT" createunit [_markerPos, groupAlpha]; G3 setdir 180;