splatsh
Member-
Content Count
123 -
Joined
-
Last visited
-
Medals
Everything posted by splatsh
-
Random weather & Dynamic weahter.
splatsh posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Where do I find any good script with random weather, like random fog, and random rain, and random time. (Everytime I start mission it should not be the same weather & time.) Where do I find dynamic weather change, example that weather cheange every hour or so... start to rain, more fog, less rain, less fog and so on. Would nice if there is something like that. Thanks. -
I have this right now: // Code with spawn of vehicle // " // " // " // Code with creation of wayoints // " // " // " // Code with waypoint 2 // Here I have one setWaypointStatements ["true","TheEnd=1;"]; // " // " // " // Code with delete stuff if (TheEnd == 1) then { Delete all stuff }; Now, how can I at best way check if my spawned stuff is alive all the way from start to the end? 1) Create a trigger to check it 2) With other code to check it (what kind of code can I use then)
-
Check alive, better way?
splatsh replied to splatsh's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Wow, cool, thanks =) -
Check alive, better way?
splatsh replied to splatsh's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thanks. ---------- Post added at 07:44 PM ---------- Previous post was at 07:28 PM ---------- It was no good with that check... I shoot it so its engine got damage, so the helo landed. And then the helo got no damage 1. I need to check if vehicle is alive or canMove And if it is not alive and can not move, then I need to do some code. But where to put that code in my code? And what to use: - do while... - If vehicle... -
Check alive, better way?
splatsh replied to splatsh's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
It is just for delete stuff =) ---------- Post added at 07:05 PM ---------- Previous post was at 07:04 PM ---------- -
Helo safe landing without crash?
splatsh replied to splatsh's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Oh, thanks, I will try it out later =) Thanks =) -
Helo safe landing without crash?
splatsh posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I have a code that is called by player. Then the code will create a marker in front of player and the helo is landing at that marker. But if I am in a big town or in a heavy forest, then the helo will allways try to land at the marker and allways chrash. So how can I get the helo to land on safe ground? -
Get position under one object or attachTo
splatsh posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
This code will spawn one MtvrRefuel on my transporthelo in air: _spawntype = [position transporthelo, 0, "MtvrRefuel", WEST] call bis_fnc_spawnvehicle; 1) How to do if I want the MtvrRefuel to spawn 5 meter under the transporthelo? Can my transporthelo fly with this MtvrRefuel attached with attachTo command? If yes then: 2) How to attach this MtvrRefuel to this transporthelo, so its attached like 5 meter under the transporthelo with code? 3) How to release this MtvrRefuel from transporthelo with code? -
Get position under one object or attachTo
splatsh replied to splatsh's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Nice, thanks. Now I can build some nice support =) -
Cancel a support waypoint, how to?
splatsh replied to splatsh's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
deleteWaypoint work fine =) Thanks -
Cancel a support waypoint, how to?
splatsh posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
If I give a medic a support waypoint with: wp08 = _spawngroup addwaypoint [_cpos, 0]; // Position player wp08 setwaypointtype "SUPPORT"; wp08 setWaypointSpeed "FULL"; wp08 setWaypointStatements ["true",""]; How to cancel that wayoint and give it one other waypoint, one "MOVE" waypoint for example? I did try this, but it did not work: wp09 = _spawngroup addwaypoint [_cpos, 10]; // Position player wp09 setwaypointtype "MOVE"; wp09 setWaypointSpeed "FULL"; wp09 setWaypointStatements ["true",""]; -
I am playing with som stuff, and now I am trying to build one support script that will fly in some medics and so on.. And to get my medics into the chopper I use this call_medic.sqf {_x assignAsCargo _transporthelo; _x moveInCargo _transporthelo} forEach Units _spawngroup; Now the transporthelo is flying to me and land and the medics are coming to me (player) So far so god... Now I have done one addAction to get cancel on my medics, and I want to let them go inside this chopper again and the chopper will lift of and go home. menuID0_7 = _unit addaction ["Cancel Medic", "scripts\request\medic\cancel.sqf", [], 1, false, true, "", ""]; cancel_medic.sqf _unit = _this select 0; // who called it. hint "Medic team returning to base!"; {_x assignAsCargo _transporthelo; _x action ["getIn", _transporthelo]} foreach units _spawngroup; How do I get right arguments in my addAction to get my code to work proper in cancel_medic.sqd file?
-
addAction arguments, help
splatsh replied to splatsh's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I have now remaked my code and after the help I got from you I got this to wirk fine now, and I got it all to work as I wanted. Thanks My code are: call_medic.sqf menuID0_7 = _unit addaction ["Cancel Medic", "scripts\request\medic\cancel.sqf", [transporthelo, _spawngroup, _chGroup], 1, false, true, "", ""]; cancel.sqf _unit = _this select 0; // who called it. _position = (_this select 3) select 0; // Helo position _spawngroup = (_this select 3) select 1; // Group with medic _chGroup = (_this select 3) select 2; // Helo pilot group DeleteAll = 0; HomeReady = 0; hint "Medic team returning to base!"; // Assign group to helo {_x assignAsCargo _position;} forEach Units _spawngroup; // Create waypoint to get group inside helo wp03 = _spawngroup addwaypoint [_position, 10]; wp03 setwaypointtype "GETIN NEAREST"; wp03 setWaypointStatements ["true","HomeReady=1"]; waitUntil {HomeReady == 1}; // Create waypoint to get helo to fly home wp04 = _chGroup addwaypoint [getMarkerPos "hStart", 10]; wp04 setwaypointtype "MOVE"; wp04 setWaypointStatements ["true","DeleteAll=1; {deleteVehicle _x} forEach crew transporthelo; deletevehicle transporthelo;"]; waitUntil {DeleteAll == 1}; deleteMarker hStart; // Delete marker. hint "Medic team are ready for new orders!" Thanks for the assist and help. And I am sure this code can get better and so on, but it works anyway so I am happy, feel free to make it better if you want to =) -
addAction arguments, help
splatsh replied to splatsh's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I am sorry, but that did not work =/ -
addAction arguments, help
splatsh replied to splatsh's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Oh sorry, I mean cancel.sqf =) And I have this in my code: _ch = [[_start select 0, _start select 1, 50], _flightPath, _chopperType, side _unit] call BIS_fnc_spawnVehicle; transporthelo = _ch select 0; _chGroup = _ch select 2; _ch select 0 setVehicleInit "transporthelo = this; this setVehicleVarName ""transporthelo"""; But I don't have any like that for my group of medics, I use _spawngroup = [_start, WEST, ["US_Soldier_TL_EP1", "US_Soldier_MG_EP1", "US_Soldier_Medic_EP1", "US_Soldier_Medic_EP1", "US_Soldier_Medic_EP1", "US_Soldier_Medic_EP1"],[],[],[],[],[],180] call BIS_fnc_spawnGroup; And my waypoints is working fine wp01 = _chGroup addwaypoint [_landPos, 0]; wp01 setwaypointtype "TR UNLOAD"; wp01 setWaypointStatements ["true","MedicOut=1;transportHelo land ""LAND"""]; waitUntil {MedicOut == 1}; wp02 = _spawngroup addwaypoint [_cpos, 10]; wp02 setwaypointtype "MOVE"; wp02 setWaypointSpeed "FULL"; wp02 setWaypointStatements ["true","MedicReady=1"]; And I am at this part right now waitUntil {MedicReady == 1}; hint "You can now cancel your support medic team!"; menuID0_7 = _unit addaction ["Cancel Medic", "scripts\request\medic\cancel.sqf", ["_transporthelo", "_spawngroup"], 1, false, true, "", ""]; And the last part is not working cancel.sqf _unit = _this select 1; _transporthelo = (_this select 3) select 0; _spawngroup = (_this select 3) select 1; hint "Medic team returning to base!"; {_x assignAsCargo _transporthelo; _x action ["getIn", _transporthelo]} foreach units _spawngroup; -
addAction arguments, help
splatsh replied to splatsh's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Well, I think that is that I am trying to find out and I did think that my addAction could tell cancel_medic.sqf Is that wrong? How does the cancel_medic.sqf file know what _trasporthelo and _spawngrop is then? =) -
OH SO CLOSE!...or support waypoint posibilities.
splatsh replied to Otterbear's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
My AH-64D does not fly around to support, it does land as my support chopper with medic does. And my A-10 fly in air to support until the support group say Ready. After that the plane will fly to runway and land, after that the pilot leave the plane and run to the support group. And my AH-64D crew does the same, they land when ready is on, and then they leave the chopper and run to support squad. And then all will stay there. No dirent if I press 5-1-6 (Done) to my support medic call. And the medic that is in the support group is not healing my wounded men until I run request medic one more time after they have give ready order and I give done order. Is there any better way to get support then the game support waypoint does? -
How to addaction with this? This is what I have in player initfield to get the right loadout. hNil = [this, "SMAW"] call compile preprocessFile "scripts\fnc_gear.sqf"; Now I want to add some addaction that is load different loadouts. Some code to show you how I want it. player addaction ["GEAR: SMAW","[player, "SMAW"]scripts\fnc_gear.sqf"]; player addaction ["GEAR: STINGER","[player, "STINGER"]scripts\fnc_gear.sqf"]; But this code don't work. So how do I write right code that works for my purpose? Thanks
-
addaction problem
splatsh replied to splatsh's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
oki :) Initfield player: _startGear = [this, "JAVELIN"] call compile preprocessFile "scripts\fnc_gear.sqf"; _playerInit = [this] execVM "init_player.sqf"; fnc_gear.sqf if (!isServer) exitWith {}; _unit = _this select 0; _strLoadout = _this select 1; if (_strLoadout == _unit) then {_strLoadout = _this select 3}; removeAllWeapons _unit; removeBackpack _unit; switch (_strLoadout) do { case "MG": { {_unit addBackpack "US_Backpack_AmmoMG_EP1";} forEach [1]; clearMagazineCargo unitBackpack _unit; {_unit addMagazine "100Rnd_556x45_BetaCMag";} forEach [1,2,3,4,5]; {_unit addMagazine "ACE_Bandage";} forEach [1,2,3,4,5,6,7,8]; _unit addWeapon "M249_m145_EP1"; (unitBackpack _unit) addMagazineCargo ["100Rnd_556x45_BetaCMag",5]; }; case "START": { {_unit addBackpack "US_Backpack_AmmoMG_EP1";} forEach [1]; clearMagazineCargo unitBackpack _unit; {_unit addMagazine "100Rnd_556x45_BetaCMag";} forEach [1,2,3,4,5]; {_unit addMagazine "ACE_Bandage";} forEach [1,2,3,4,5,6,7,8]; _unit addWeapon "M249_m145_EP1"; (unitBackpack _unit) addMagazineCargo ["100Rnd_556x45_BetaCMag",5]; }; case "STINGER": { {_unit addBackpack "US_Backpack_AmmoMG_EP1";} forEach [1]; clearMagazineCargo unitBackpack _unit; {_unit addMagazine "20Rnd_762x51_B_SCAR";} forEach [1,2,3,4,5]; {_unit addMagazine "ACE_Bandage";} forEach [1,2,3,4,5,6,7,8]; _unit addWeapon "Stinger"; _unit addWeapon "ACE_SCAR_H_STD_Spect"; (unitBackpack _unit) addMagazineCargo ["20Rnd_762x51_B_SCAR",5]; (unitBackpack _unit) addMagazineCargo ["Stinger",1]; }; case "JAVELIN": { {_unit addBackpack "US_Backpack_AmmoMG_EP1";} forEach [1]; clearMagazineCargo unitBackpack _unit; {_unit addMagazine "20Rnd_762x51_B_SCAR";} forEach [1,2,3,4,5]; {_unit addMagazine "ACE_Bandage";} forEach [1,2,3,4,5,6,7,8]; {_unit addMagazine "ACE_Javelin_Direct";} forEach [1]; _unit addWeapon "ACE_Javelin_Direct"; _unit addWeapon "ACE_SCAR_H_STD_Spect"; (unitBackpack _unit) addMagazineCargo ["ACE_Javelin_Direct",1]; (unitBackpack _unit) addMagazineCargo ["20Rnd_762x51_B_SCAR",5]; }; case "SNIPER": { {_unit addBackpack "US_Backpack_AmmoMG_EP1";} forEach [1]; clearMagazineCargo unitBackpack _unit; {_unit addMagazine "ACE_5Rnd_127x99_B_TAC50";} forEach [1,2,3,4,5,6,7,8,9,10,11]; {_unit addMagazine "ACE_Bandage";} forEach [1,2,3,4,5,6,7,8]; _unit addWeapon "ACE_AS50"; (unitBackpack _unit) addMagazineCargo ["ACE_5Rnd_127x99_B_TAC50",10]; }; case "SMAW": { {_unit addBackpack "US_Backpack_AmmoMG_EP1";} forEach [1]; clearMagazineCargo unitBackpack _unit; {_unit addMagazine "20Rnd_762x51_B_SCAR";} forEach [1,2,3,4,5]; {_unit addMagazine "ACE_Bandage";} forEach [1,2,3,4,5,6,7,8]; {_unit addMagazine "SMAW_HEAA";} forEach [1,2]; _unit addWeapon "SMAW"; _unit addWeapon "ACE_SCAR_H_STD_Spect"; (unitBackpack _unit) addMagazineCargo ["20Rnd_762x51_B_SCAR",5]; (unitBackpack _unit) addMagazineCargo ["SMAW_HEAA",1]; }; }; if (!(_unit hasWeapon "itemGPS")) then { _unit addWeapon "itemGPS"; }; _unit addWeapon "Binocular_Vector"; _unit addWeapon "NVGoggles"; _unit addMagazine "ACE_Battery_Rangefinder"; _primaryWeapon = primaryWeapon _unit; _unit selectweapon _primaryWeapon; // Fix for weapons with grenade launcher _muzzles = getArray(configFile>>"cfgWeapons" >> _primaryWeapon >> "muzzles"); _unit selectWeapon (_muzzles select 0); init_player.sqf _unit = _this select 0; _plactID1 = _unit addAction ["Gear: STINGER","scripts\fnc_gear.sqf",[_unit, "STINGER"],1,false]; _plactID2 = _unit addAction ["Gear: JAVELIN","scripts\fnc_gear.sqf",[_unit, "JAVELIN"],1,false]; _plactID3 = _unit addAction ["Gear: SMAW","scripts\fnc_gear.sqf",[_unit, "SMAW"],1,false]; _plactID4 = _unit addAction ["Gear: MG","scripts\fnc_gear.sqf",[_unit, "MG"],1,false]; _plactID5 = _unit addAction ["Gear: SNIPER","scripts\fnc_gear.sqf",[_unit, "SNIPER"],1,false]; _plactID6 = _unit addAction ["Request: Transport","init_transport.sqf"]; -
addaction problem
splatsh replied to splatsh's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Are you sure? I tested to do so at firts, but without good result. Please upload a demo so I can see that I tested the right thing. -
addaction problem
splatsh replied to splatsh's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thanks, I have now done this: At player init: _playerInit = [this] execVM "init_player.sqf"; init_player.sqf _unit = _this select 0; _plactID1 = _unit addAction ["Gear: STINGER","scripts\change_gear.sqf",[_unit, "STINGER"],1,false]; _plactID2 = _unit addAction ["Gear: JAVELIN","scripts\change_gear.sqf",[_unit, "JAVELIN"],1,false]; _plactID2 = _unit addAction ["Gear: SMAW","scripts\change_gear.sqf",[_unit, "SMAW"],1,false]; _plactID2 = _unit addAction ["Gear: MG","scripts\change_gear.sqf",[_unit, "MG"],1,false]; _plactID2 = _unit addAction ["Gear: SNIPER","scripts\change_gear.sqf",[_unit, "SNIPER"],1,false]; At this works great and it works as I wanted it do work. Thanks for the assist on that one :) No to the problem I got, how do I call a custom loadout from a player at player initfield? My change_gear.sqf look like this now: change_gear.sqf _unit = _this select 1; _strLoadout = (_this select 3) select 1; removeAllWeapons _unit; removeBackpack _unit; switch (_strLoadout) do { case "MG": { {_unit addBackpack "US_Backpack_AmmoMG_EP1";} forEach [1]; clearMagazineCargo unitBackpack _unit; {_unit addMagazine "100Rnd_556x45_BetaCMag";} forEach [1,2,3,4,5]; {_unit addMagazine "ACE_Bandage";} forEach [1,2,3,4,5,6,7,8]; _unit addWeapon "M249_m145_EP1"; (unitBackpack _unit) addMagazineCargo ["100Rnd_556x45_BetaCMag",5]; }; case "START": { {_unit addBackpack "US_Backpack_AmmoMG_EP1";} forEach [1]; clearMagazineCargo unitBackpack _unit; {_unit addMagazine "100Rnd_556x45_BetaCMag";} forEach [1,2,3,4,5]; {_unit addMagazine "ACE_Bandage";} forEach [1,2,3,4,5,6,7,8]; _unit addWeapon "M249_m145_EP1"; (unitBackpack _unit) addMagazineCargo ["100Rnd_556x45_BetaCMag",5]; }; case "STINGER": { {_unit addBackpack "US_Backpack_AmmoMG_EP1";} forEach [1]; clearMagazineCargo unitBackpack _unit; {_unit addMagazine "20Rnd_762x51_B_SCAR";} forEach [1,2,3,4,5]; {_unit addMagazine "ACE_Bandage";} forEach [1,2,3,4,5,6,7,8]; _unit addWeapon "Stinger"; _unit addWeapon "ACE_SCAR_H_STD_Spect"; (unitBackpack _unit) addMagazineCargo ["20Rnd_762x51_B_SCAR",5]; (unitBackpack _unit) addMagazineCargo ["Stinger",1]; }; case "JAVELIN": { {_unit addBackpack "US_Backpack_AmmoMG_EP1";} forEach [1]; clearMagazineCargo unitBackpack _unit; {_unit addMagazine "20Rnd_762x51_B_SCAR";} forEach [1,2,3,4,5]; {_unit addMagazine "ACE_Bandage";} forEach [1,2,3,4,5,6,7,8]; {_unit addMagazine "ACE_Javelin_Direct";} forEach [1]; _unit addWeapon "ACE_Javelin_Direct"; _unit addWeapon "ACE_SCAR_H_STD_Spect"; (unitBackpack _unit) addMagazineCargo ["ACE_Javelin_Direct",1]; (unitBackpack _unit) addMagazineCargo ["20Rnd_762x51_B_SCAR",5]; }; case "SNIPER": { {_unit addBackpack "US_Backpack_AmmoMG_EP1";} forEach [1]; clearMagazineCargo unitBackpack _unit; {_unit addMagazine "ACE_5Rnd_127x99_B_TAC50";} forEach [1,2,3,4,5,6,7,8,9,10,11]; {_unit addMagazine "ACE_Bandage";} forEach [1,2,3,4,5,6,7,8]; _unit addWeapon "ACE_AS50"; (unitBackpack _unit) addMagazineCargo ["ACE_5Rnd_127x99_B_TAC50",10]; }; case "SMAW": { {_unit addBackpack "US_Backpack_AmmoMG_EP1";} forEach [1]; clearMagazineCargo unitBackpack _unit; {_unit addMagazine "20Rnd_762x51_B_SCAR";} forEach [1,2,3,4,5]; {_unit addMagazine "ACE_Bandage";} forEach [1,2,3,4,5,6,7,8]; {_unit addMagazine "SMAW_HEAA";} forEach [1,2]; _unit addWeapon "SMAW"; _unit addWeapon "ACE_SCAR_H_STD_Spect"; (unitBackpack _unit) addMagazineCargo ["20Rnd_762x51_B_SCAR",5]; (unitBackpack _unit) addMagazineCargo ["SMAW_HEAA",1]; }; }; if (!(_unit hasWeapon "itemGPS")) then { _unit addWeapon "itemGPS"; }; _unit addWeapon "Binocular_Vector"; _unit addWeapon "NVGoggles"; _unit addMagazine "ACE_Battery_Rangefinder"; _primaryWeapon = primaryWeapon _unit; _unit selectweapon _primaryWeapon; // Fix for weapons with grenade launcher _muzzles = getArray(configFile>>"cfgWeapons" >> _primaryWeapon >> "muzzles"); _unit selectWeapon (_muzzles select 0); And I want that each of my player start diferent loadouts. Example of players initfield: Player 1: _LoadOut = [this, "MG"] execVM "scripts\change_gear.sqf"; Player 2: _LoadOut = [this, "JAVELIN"] execVM "scripts\change_gear.sqf"; Player 3: _LoadOut = [this, "STINGER"] execVM "scripts\change_gear.sqf"; Now this exampel is not working, so how to write it so it will work with my change_gear.sqf file? And my addAction must work at the same time in that way I got it now with my change_gear.sqf file. -
Support - All works but not Ambulance support, what is needed?
splatsh replied to splatsh's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
One ambulance is needed. I did not see that one yesterday. But know I got ambulance out on my map and waypoint support to it. So now it works. -
Support - All works but not Ambulance support, what is needed?
splatsh posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I want to have some medic and supply support and so on. This is what works for me. Place one squad and make leader a player Place waypoint support on medic, repairtruck, ammotruck, fueltruck and then - Call medic support. - Call repair support. - Call fuel support. - Call ammo support. With 5-1 button. But I can't get this Ambulance support to work, all it say is negative. So what do I need to get ambulance support to work? Thanks -
Support - All works but not Ambulance support, what is needed?
splatsh replied to splatsh's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I was shooting my own at some point to test that to :D But no luck with the ambulance... Do I need to place a medic or can I just place that medic chopper and no more to get him to support me? If I place a medic and group him with my chopper, then they will come and support me when I call for medic support, not ambulance support. :j: So how is support waypoint work? Do I need one medic in every team that I want to support me? (Not ammo, fuel or repair trucks) And how to get respond on ambulance? Anyone that done that and got it to work? Please tell me how, and please link up with your mission so I can take a look Thanks. -
Support - All works but not Ambulance support, what is needed?
splatsh replied to splatsh's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Oh, okej, but I can't get this chopper to move... they only say negative... I place the chopper (UH-60 M MEDEVAC) Give it a support waypoint Place myself in a squad as leader Start mission Press 5-1-2 and requesting a ambulance Then they allways say "NEGATIVE" to me... I don't know why they do that, all other stuff is working... What can be wrong?