Jump to content

=Odin=

Member
  • Content Count

    108
  • Joined

  • Last visited

  • Medals

Everything posted by =Odin=

  1. Or try this small script launched from the trigger. name the H/pad IED in trigger call it like this <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">// Choose Ammo Type; //_shelltype = "G_40mm_HE"; //_shelltype = "Grenade"; //_shelltype = Â "G_Camel_HE"; //_shelltype = Â "M_R73_AA"; //_shelltype = Â "B_30mm_HE"; //_shelltype = Â "B_25mm_HE"; //_shelltype = Â "R_Hydra_HE"; //_shelltype = Â "M_Sidewinder_AA"; //_shelltype = "Sh_105_HE"; //_shelltype = Â "B_30mm_HE"; //_shelltype = "Sh_120_HE"; //_shelltype = "Sh_122_HE"; //_shelltype = "Sh_125_HE"; //_shelltype = Â "R_S8T_AT" //_shelltype = Â "M_TOW_AT"; //_shelltype = Â "M_AT5_AT"; //_shelltype = "Sh_120_SABOT"; //_shelltype = "bomb"; //_shelltype = Â "M_Vikhr_AT"; //_shelltype = Â "M_Hellfire_AT"; //_shelltype = Â "M_Ch29_AT"; _shelltype = "Bo_GBU12_LGB"; IED = _this select 0; _seek = random 10; _xxpos = (getPos IED select 0); _yypos = (getPos IED select 1); _count = 0; while{IED isKindOf "HeliHEmpty"} do { _count = _count + 1; hint "It is here"; sleep 2; //Get object position; _exp = _shelltype createvehicle getpos IED; _exp setPosAsl [(getPos _exp select 0),(getPos _exp select 1),(getPos _exp select 2)]; _veharray = [_xxpos,_yypos,0] nearObjects ["All", (100 + _seek)]; {_x setdammage ((getdammage _x) + 1)} forEach _veharray; sleep 0.2; deletevehicle IED; if (not isnull IED) exitWith {hint "Over";}; Â }; if (_count<1) exitWith {hint "Where is my IED";}; If the IED object is not present nothing happens. EDIT; Jeeves script would'nt work with my original script so I changed it around so it will give the IED effect from within itself now. EDIT AGAIN; I have now got it to work with Jeeves IED script so it is called the same as the trigger example above but the new script is <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">IED = _this select 0; _count = 0; sleep 1; while{IED isKindOf "HeliHEmpty"} do { _count = _count + 1; hint "It is here"; sleep 2; [theCar, "Small"] exec "IED.sqs"; sleep 0.2; deletevehicle IED; if (not isnull IED) exitWith {hint "Over";}; Â }; if (_count<1) exitWith {hint "Where is my IED";}; Both scripts work but the 1st example will only detonate from the H/pad. Hope one of them helps. Odin
  2. =Odin=

    Help with radio trigger

    Anytime mate, I have only been doing scripting about a year now and still consider myself a noob, so much to learn/ and forget the forums are a great place to start. btw If you are calling SQF via the RadioTrigger script, replace the setTriggerStatements line with this, <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">radioAlpha setTriggerStatements["this", "execVM ""artillery\setfire.sqf""", ""]; GL Odin
  3. =Odin=

    Help with radio trigger

    Heya, sorry for the slow response busy week at work( I hates laying floorboards ) Anyhoo to answer your question, The way you are trying to do it with the setRadioMsg is probably not going to work the way you are wanting it to, because as soon as it is activated it is going to give the message you want..... but also will execute the script. So to get it to work as you are asking we need to create the radio trigger on the fly. 1st create this trigger ; activation- none ; type- switch ; name- radioAlpha ; condition-this ; onAct- 2nd create this trigger ; activation- none ; type- none ; name- ; condition- (not alive a1) and (not alive a2) and (not alive a3) and (not alive a4) ; onAct- PAPABEAR=[West,"HQ"]; PAPABEAR SideChat "Gunship now in range"; this = execVM "RadioTrigger.sqf" This is the script that will creat our radio trigger and luanch the script. RadioTrigger.sqf <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">if (local player) then { radioAlpha = createTrigger["EmptyDetector",getPos player]; radioAlpha setTriggerArea[0,0,0,false]; radioAlpha setTriggerText "25mm GAU-12 Gatling gun"; radioAlpha setTriggerActivation["ALPHA","PRESENT",true]; radioAlpha setTriggerStatements["this", "[] exec ""artillery\setfire.sqs""", ""]; sleep 1; }; I hope this helps
  4. =Odin=

    Help with radio trigger

    G'day, put somthing like this in the condition. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">(not alive a1) and (not alive a2) and (not alive a3) and (not alive a4); a1 --> to a4 representing the names of your AAA, just add or subtract to suit the amount of units that need to be dead befor trigger kicks Odin
  5. =Odin=

    Vehicles to Play Music

    I mucked about with Getting music louder than the vehicle and found that setting the music and voice .ogg's, in an editor like Audacity to something like +12 or +15 decibles then exporting as .ogg to mission folder,drowns out the vehiclesound, with out mucking with the decible level in the description.exe Not really sure what you mean here but I will take a stab and assume that the music is invehicle as a radio background ambience type thing and you need to be able to turn it down when the units inside engage in conversation. if it is I would use the fademusic comand in your script when then convrsation starts and ends. eg; <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> playmusic ["mymusictrack", 0] ~5 5 fadeMusic 0.01 ~2 dude say "chat1" ~2 5 fadeMusic 1 ~5 5 fadeMusic 0.01 ~2 dude1 say "chat2" ~2 5 fadeMusic 1 ~5 5 fadeMusic 0.01 ~2 dude2 say "chat3" ~2 5 fadeMusic 1 Just need to muck about with the sleep times so they corrispond with with the conversation to going soft and loud again. hope that helps ya a bit
  6. =Odin=

    Vehicles to Play Music

    Heya mate, I am not sure of any other way to get the music louder but to make it stop and start as you wish use this FAQ over at OFPEC, (getin, getout EH"s) works a treat. Odin
  7. You could try something like this, in your init; <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">nul=[] execVM "initPlayer.sqf"; the initplayer.sqf <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">if (!isServer && (player != player)) then { // This only executes on a JIP player's computer, because that's the only place where !isServer && (player != player) during init.sqf waitUntil { player == player }; waitUntil { time > 10 }; }; switch playerSide do { case east: { execVM "eastinit.sqf" }; case west: { execVM "westinit.sqf" }; case resistance: { execVM "indiinit.sqf" }; }; westinit.sqf <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">player addeventhandler ["killed", {_this execVM "was_killed.sqf"}]; player execVm "actions.sqf"; Hope that helps Odin
  8. G'day, I tried it this way with a Marker and it works <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _insurgent1 = "soldierE" createvehicle getmarkerpos "rt" _insurgent1 setpos [(getmarkerpos "rt" select 0), (getmarkerpos "rt" select 1), 10] _insurgent2 = "soldierE" createvehicle getmarkerpos "rt1" _insurgent2 setpos [(getmarkerpos "rt1" select 0), (getmarkerpos "rt1" select 1), 10] Srry I used East soldiers in my test, are insurjents an Addon? GL Odin
  9. =Odin=

    Solution wanted

    G'day, you could try this, As said above setcaptive true to your SF guys for the zodiac offense. create an empty CRRC and name it "zodiac" create an blufor driver for the boat, call him skipper and set his waypoints as normal. add this to his init <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this setCaptive true; skipper moveInDriver zodiac;this addEventHandler ["HIT",{(_this select 0) setDamage (-10 * damage (_this select 0));}]; I think this may be the eventhandler MrP was talking about, so check that post out for more info on how it works. put this in a trigger that covers the landing zone for the SF. activation: BLUFOR condition: this OnAct: {_x setCaptive false} foreach thislist And for the SLA shooting the Zodiac add this to chosen OPFOR units init; "unitname" commandFire zodiac GL Odin
  10. G'day, I have searched and read lots of great post/replies on this issue, but I cant get it to work. What I want is to be able to delete deadBodies after a Condition is met. At the moment I have a trigger called "burybod" and this script; <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#Loop ?! alive a1: goto "remove" _dead = _this select 0; _overall_dead = _overall_dead + [_dead]; hint "works" goto "loop" #remove hint "part2" _goaway = {hidebody _x} forEach (list burybod) {if (typeOf _x != "logic") then {{deleteVehicle _x} forEach crew _x;deleteVehicle _x};} forEach (list burybod) hint "end" This deletes vehicles and burys any Dead after the condition is met, but still leaves the bodies of those who died before the trigger was tripped. I am trying my hardest to get the dead into an Array so I can delete the bods but Alas, Can someone enlighten me on what I need to do to acheive this please? Cheers Odin
  11. Heya Linker split , Changed condition to this, no errors, but still won't work, other than deleteing all the living. Is trying to get the Dead into an Array the way to go? do I have to init the Array "_overall_dead "? at the moment I have this in the init, not sure if it is the rightway to call it overall_dead = 0; EDIT; solved it, if any one is interested let me know thanxs Odin
  12. Heya Mate, sorry for being vague, was under the influence of VB when I wrote it, cans of green death What I want to Acheive is clear a Trigger area of the living and dead aswell as vehicles of all sides once an objective or condition is met. For testing purposes I am just using the Death of a unit "a1" to move to the removal part of the script. the bury bod trigger; activation-anybody-repeatedly type-none name- burybod condition-true activation- <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{_x addeventhandler ["killed", {[_this select 0, _this select 1] exec "count.sqs"}]} foreach thislist; No one is exempt, as the player will be at the next mission area when triggered. Thx
  13. =Odin=

    What am I doing wrong?

    G'day, forget the scripts and add this line into each civs init. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> this addWeapon "m16a2";{this addMagazine "30Rnd_556x45_Stanag"} foreach [0,0,0,0,0,0,0,0,0,0]; should work mate Odin
  14. =Odin=

    Smoke Help

    G'day, Change the 1st line to <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_OBJ = "logic" createvehicle getpos _this; create your Logics and add to their init <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this exec "fire.sqs" That should work
  15. =Odin=

    zSniper in Treetop

    Heya mate, create your unit, for this example call him bob In his int add <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[] exec "bob.sqs" this is the bob.sqs <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#loop bob setpos [ getPos bob select 0, getPos bob select 1, 20] goto "loop" GL
  16. =Odin=

    pos player

    Heya mate' not sure if this will help but it works, In the vehicle init add this <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">;this addaction ["Call AI", "spawn.sqs",[],-1, false, false, ""];this addEventHandler ["killed",{_this exec "m113spawn.sqs"}] For the spawn.sqs <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_vehicle = _this select 0; _grp = group player _unit = _grp createUnit ["SoldierGB", position _vehicle, [], 0, "FORM"]; And the vehicle respawn sqs <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">;ENTER THIS CODE IN THE VEHICLE INIT ;this addaction ["Call AI", "spawn.sqs",[],-1, false, false, ""];this addEventHandler ["killed",{_this exec "m113spawn.sqs"}] #start hint "works" ~20 _vehicle = "M113_RACS" createVehicle getMarkerPos "Vehicle_ReSpawn" _AISPAWNkilled = _vehicle addEventHandler ["killed", {_this exec "m113spawn.sqs"}] _unit = _vehicle addaction ["Call AI", "spawn.sqs",[],-1, false, false, ""]; exit wasnt sure what the respawn marker for the vehicle was so I just used Vehicle_ReSpawn. Anyway the addaction will be readded on every spawn Odin
  17. =Odin=

    Smoke Help

    G'day I had this problem aswell and to fix it I added this <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_OBJ = "logic" createvehicle getpos burn; _OBJ setpos [Getpos burn select 0,(Getpos burn select 1), 2] The 2 representing meter's above ground, I have not tried to do this on anything as high as a smoke stack so it may take a bit of fiddling to get the correct height
  18. I think that is the trick, I have not tested it myself, but was going to soon, let me know how it looks mate  Edit: srry read your question properly you would allready know this I think, and I have no Idea on getting getting a NV check to work srry Odin
  19. =Odin=

    Unit names in Mission

    Yup in the editor, this will give the unit a name that you can see and choose on the multiplayer setup menu at the start of your game.
  20. =Odin=

    Unit names in Mission

    Do you mean by adding the units name so it is displayed at the begining of the mission? If so type the units name in the description field, in the edit unit box
  21. G'day I had this problem too, Check out this post it may be what you need Odin
  22. G'day' If you mean that other players are seeing "Your addAction text"? you could try somthing like this in a script, addaction script (.sqf); <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">//_target = _this select 0; // action param _caller = _this select 1; //id = _this select 2; // action param if (_caller != player) exitWith {}; titleText["It smells like Elder Berries", "PLAIN DOWN"]; _my_dialog_Action = myObject addaction ["Myaddaction", "myscript.sqs",[],-1, false, false, ""]; you can change "myscipt.sqs" to .sqf without the need for execVM GL Odin
  23. =Odin=

    I need your help

    G'day, this topic covers a few of the jobs you have asked about it is availablehere When you say a weapons dialog do you mean a popup ingame to select weapons, or the loadout selection at the start of a mission? For a timer to end mission; in the init add this line, <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">nul=[] execVM "timer.sqf"; timer.sqf <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">End={ while{_this-round(time)>0}do{ hint format ["time left: %1 seconds",_this-round(time)]; sleep 1; }; hint "Game Over..."; _marker = execVM "outro.sqf"; }; 10 spawn End; outro.sqf <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">0 fademusic 0; playmusic ["ATrack8",144]; 1 fademusic 1; TitleCut ["","BLACK OUT", 0.5]; TitleText["Mission Failed!\n Time is up...\n\n Game Over","Plain Down"]; Over2=true; exit; That will give you a screen display countdown from 10sec untill the outro is fired, of course just edit the timer.sqf to suit your mission as the 10sec thing is just for testing. Hope it helps Odin
  24. Heya mate, I think the add magazine line should go befor addweapon ( this addmagazine "JAVELIN" ; this addweapon "JAVELIN" ) also you may need to remove the original player type magazines to fit the javelin ammo using the removeMagazine command, which should be done prior to the add commands. Edit; read the ammobox part Create an ammobox and name it, box Add this to its init <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[] exec "boxx.sqs"; This script has the Javelin and its ammo aswell as other explosive type ordinance I put together. you can modify it to your liking using whatever weapon classnames you like available Here boxx.sqs <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#Big Guns clearmagazinecargo box; clearweaponcargo box; box AddWeaponCargo ["M4A1GL",20]; box AddWeaponCargo ["M136",40]; box AddWeaponCargo ["Stinger",40]; box AddMagazineCargo ["30Rnd_556x45_Stanag",80]; box AddMagazineCargo ["HandGrenadeTimed",80]; box AddMagazineCargo ["M136", 150]; box AddMagazineCargo ["1Rnd_HE_M203", 150]; box AddMagazineCargo ["FlareWhite_M203",80]; box AddMagazineCargo ["FlareRed_M203",80]; box AddMagazineCargo ["FlareGreen_M203",80]; box AddMagazineCargo ["FlareYellow_M203",80]; box AddMagazineCargo ["SmokeShell",80]; box AddMagazineCargo ["SmokeShellRed",80]; box AddMagazineCargo ["SmokeShellGreen",80]; box AddMagazineCargo ["Stinger",80]; box AddWeaponCargo ["Binocular", 40]; box AddWeaponCargo ["NVGoggles",150]; box AddWeaponCargo ["Laserdesignator",80]; box AddWeaponCargo ["JAVELIN",80]; box AddMagazineCargo ["JAVELIN",150]; box AddMagazineCargo ["Laserbatteries",80]; box AddMagazineCargo ["pipebomb",40]; box AddMagazineCargo ["Mine",40]; This is for the allies so just change it around to suit your needs or side GL Odin
  25. Both methods worked great, Thanks alot Odin
×