Jump to content

aurora1-4

Member
  • Content Count

    26
  • Joined

  • Last visited

  • Medals

  • Medals

Community Reputation

10 Good

About aurora1-4

  • Rank
    Private First Class

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I have changed _obj to the variable name of the ammobox (which is "ammobox"). //Edit// I have done a little research and it seems like, as Lazarch mentioned, it would probably be better to save the contents of the box to the serverNamespace or missionNamespace I think. My thought was to have something like this inside a exit.sqf file: _savedammobox = { private _items = format ["private _items = %1;", getItemCargo ammobox]; private _weaps = format ["private _weaps = %1;", getWeaponCargo ammobox]; private _mags = format ["private _mags = %1;", getMagazineCargo ammobox]; private _packs = format ["private _packs = %1;", getBackpackCargo ammobox]; private _br = toString [13,10]; private _stuff = _items + _br + _weaps + _br + _mags + _br + _packs; }; _profile = missionNamespace getvariable ["_savedammobox", []]; missionNamespace setVariable ["_savedammobox", _profile]; This executes without error, but I don't really know where it goes after that... And I don't really know how I would either call it back and format it into this: private _items = [["optic_Hamr","ItemWatch","ItemCompass","ItemGPS","ItemRadio","ItemMap","FirstAidKit"],[2,1,1,1,1,1,6]]; private _weaps = [["arifle_SPAR_01_blk_F","Binocular"],[2,1]]; private _mags = [["30Rnd_556x45_Stanag_red"],[12]]; private _packs = [["B_AssaultPack_blk"],[2]]; private _count = count (_items#1) - 1; for "_i" from 0 to _count do { ammobox addItemCargo [(_items#0)#_i,(_items#1)#_i]; }; private _count = count (_weaps#1) - 1; for "_i" from 0 to _count do { ammobox addItemCargo [(_weaps#0)#_i,(_weaps#1)#_i]; }; private _count = count (_mags#1) - 1; for "_i" from 0 to _count do { ammobox addMagazineCargo [(_mags#0)#_i,(_mags#1)#_i]; }; private _count = count (_packs#1) - 1; for "_i" from 0 to _count do { ammobox addBackpackCargo [(_packs#0)#_i,(_packs#1)#_i]; }; or Just copy the array it gives me so I can manually put it into the eden editor. I have also tried diag_log like this, to similar outcome of not really knowing how it works: _savedammobox = { private _items = format ["private _items = %1;", getItemCargo ammobox]; private _weaps = format ["private _weaps = %1;", getWeaponCargo ammobox]; private _mags = format ["private _mags = %1;", getMagazineCargo ammobox]; private _packs = format ["private _packs = %1;", getBackpackCargo ammobox]; private _br = toString [13,10]; private _stuff = _items + _br + _weaps + _br + _mags + _br + _packs; }; diag_log _savedammobox; I found the entry in the .rpt file but it was just the contents of _savedammobox...
  2. Apologies, I'm running the dedicated server on a second PC that I have full access to. I have tried using all three solutions, and the only one that has sort of worked has been Hazarch's one (with the limitation that it doesn't work on the dedicated server). The current setup is: Trigger (Repeatable, Server Only ticked) activated by Radio Charlie. In the On Activation, I am using this script: private _items = format ["private _items = %1;", getItemCargo _obj]; private _weaps = format ["private _weaps = %1;", getWeaponCargo _obj]; private _mags = format ["private _mags = %1;", getMagazineCargo _obj]; private _packs = format ["private _packs = %1;", getBackpackCargo _obj]; private _br = toString [13,10]; private _stuff = _items + _br + _weaps + _br + _mags + _br + _packs; copyToclipboard _stuff; This seems to work for the first usage even on the dedicated server with multiple players in the server. But later on in the mission ~2hrs later, it no longer works. I am logged in as Admin when activating the trigger. I am just looking for a way to copy all the contents of an ammobox to somewhere, so that after the mission has eneded and server has been stopped, I can update the mission in the editor using a script like this: private _items = [["optic_Hamr","ItemWatch","ItemCompass","ItemGPS","ItemRadio","ItemMap","FirstAidKit"],[2,1,1,1,1,1,6]]; private _weaps = [["arifle_SPAR_01_blk_F","Binocular"],[2,1]]; private _mags = [["30Rnd_556x45_Stanag_red"],[12]]; private _packs = [["B_AssaultPack_blk"],[2]]; private _count = count (_items#1) - 1; for "_i" from 0 to _count do { ammobox addItemCargo [(_items#0)#_i,(_items#1)#_i]; }; private _count = count (_weaps#1) - 1; for "_i" from 0 to _count do { ammobox addItemCargo [(_weaps#0)#_i,(_weaps#1)#_i]; }; private _count = count (_mags#1) - 1; for "_i" from 0 to _count do { ammobox addMagazineCargo [(_mags#0)#_i,(_mags#1)#_i]; }; private _count = count (_packs#1) - 1; for "_i" from 0 to _count do { ammobox addBackpackCargo [(_packs#0)#_i,(_packs#1)#_i]; };
  3. I have tested both but can't seem to get either to work. I have a very basic level of understanding into scripting so most, if not all, of this is waaay above anything I can understand. I run the dedicated server on a PC that I have full access to. How would I go about executing this through the server? I run the server through TADST btw.
  4. I'm having a strange problem with this now. It will work at the start of the mission when I test it, but when I try to do it later into the mission it doesn't copy to clipboard anymore. The trigger is on Repeatable and Server Only but still no luck. I tried the same trigger on multiple ammo crates and neither would work. Any ideas?
  5. This works perfectly, thankyou!
  6. Hi all, I'm running a campaign with my unit where we have limited supplies. We put all of our equipment into a virtual basic ammo box at the end of each mission so we know what we have left. Looking to do one of two things: 1.) Manually export the contents of the ammo box to my clipboard, then paste it into a Notepad++ document to format. Then run a trigger to add the items at the start of each mission. So far, I do this: 1a.) I run these in 4 individual triggers at the end of the mission: (This part works) _init = [getItemCargo ammobox]; copyToClipboard str _init; _init = [getWeaponCargo ammobox]; copyToClipboard str _init; _init = [getMagazineCargo ammobox]; copyToClipboard str _init; _init = [getBackpackCargo ammobox]; copyToClipboard str _init; 1a.(ii)) I have also tried to run it through one trigger and get this: (This part works) _init = [[getItemCargo ammobox],[getWeaponCargo ammobox],[getMagazineCargo ammobox],[getBackpackCargo ammobox]]; copyToClipboard str _init; But I don't know how I would then get it to separate this output: [[[["uk3cb_optic_SUIT_FNFAL","hlc_optic_LRT_m14","ACE_wirecutter","ACE_MapTools","ACE_EntrenchingTool","ACE_key_lockpick","ACE_CableTie","ACE_Clacker","ACE_EarPlugs","ACE_elasticBandage","ACE_tourniquet","ACE_splint","ACE_morphine","ACE_epinephrine","ACE_bloodIV_500","ACE_bodyBag","acp_Solid_Tan_V_BandollierB_Solid_Tan","acp_Solid_Tan_V_Rangemaster_belt_Solid_Tan","acp_Solid_Tan_V_SmershVest_01_radio_Solid_Tan_F","acp_Solid_Tan_V_HarnessOGL_Solid_Tan_F","acp_Solid_Tan_V_HarnessO_Solid_Tan_F","acp_Solid_Tan_V_LegStrapBag_Solid_Tan_F","acp_Solid_Tan_V_ChestRigEast_Solid_Tan_F","acp_Solid_Tan_V_TacChestrig_Solid_Tan_F","ItemWatch","ItemMap","ToolKit","TFAR_anprc154","TFAR_microdagr","rhs_acc_pso1m21","acp_Solid_Tan_H_Bandanna_Solid_Tan","acp_Solid_Tan_H_Watchcap_Solid_Tan","acp_Solid_Tan_H_Booniehat_Solid_Tan","acp_Solid_Tan_H_Booniehat_Solid_Tan_hs","acp_Solid_Tan_H_Cap_Solid_Tan","acp_Solid_Tan_H_Cap_Solid_Tan_hs","acp_Solid_Tan_H_Cap_headphones_Solid_Tan","UK3CB_MDF_B_H_Off_Beret","ItemCompass","ACE_fieldDressing","ACE_adenosine","ACE_packingBandage","ACE_plasmaIV_250","acp_Solid_Tan_V_Chestrig_Solid_Tan"],[2,3,2,47,2,3,4,3,44,34,14,17,31,22,2,6,4,3,5,5,3,3,3,5,20,42,2,7,16,1,4,5,4,5,4,5,5,5,32,47,1,16,2,2]]],[[["hlc_rifle_FAL5000_XMAG","HLC_Rifle_g3ka4_GL_XMAG","hlc_rifle_M14_XMAG","launch_RPG7_F","KA_dagger","UK3CB_BHP","rhs_weap_ak74n","UK3CB_SVD_OLD","hlc_rifle_g3a3vris_XMAG","arifle_AKM_F","KA_SilverBaller_L","rhs_weap_ak74n_gp25","uk3cb_enfield_no3","rhs_weap_rpg26","Binocular"],[20,2,4,3,20,4,4,1,4,1,1,3,1,3,10]]],[[["rhs_mag_20Rnd_762x51_m61_fnfal","UK3CB_G3_20rnd_762x51_GT","hlc_50Rnd_762x51_T_G3","1Rnd_HE_Grenade_shell","UGL_FlareWhite_F","rhsusf_20Rnd_762x51_m118_special_Mag","rhs_rpg7_PG7V_mag","rhs_rpg7_OG7V_mag","MiniGrenade","SmokeShellRed","SmokeShellPurple","SmokeShellBlue","ACE_HandFlare_White","ACE_HandFlare_Red","SatchelCharge_Remote_Mag","rhs_30Rnd_545x39_7N10_AK","rhs_10Rnd_762x54mmR_7N1","UK3CB_RPK74_60rnd_545x39_R","rhs_mag_20Rnd_762x51_m80_fnfal","rhs_mag_rgd5","rhs_mag_rdg2_white"],[13,14,3,29,10,10,5,6,16,3,6,6,5,5,7,7,8,7,3,3,6]]],[[["acp_Solid_Tan_B_LegStrapBag_Solid_Tan_F","acp_Solid_Tan_B_RadioBag_01_Solid_Tan_F","acp_Solid_Tan_B_TacticalPack_Solid_Tan","UK3CB_ADG_O_B_RIF"],[3,2,5,1]]]] 1b.) I then paste into a document and format to this: (It doesn't work from this step onwards) _Items = [[[["uk3cb_optic_SUIT_FNFAL","hlc_optic_LRT_m14","ACE_wirecutter","ACE_MapTools","ACE_EntrenchingTool","ACE_key_lockpick","ACE_CableTie","ACE_Clacker","ACE_EarPlugs","ACE_elasticBandage","ACE_tourniquet","ACE_splint","ACE_morphine","ACE_epinephrine","ACE_bloodIV_500","ACE_bodyBag","acp_Solid_Tan_V_BandollierB_Solid_Tan","acp_Solid_Tan_V_Rangemaster_belt_Solid_Tan","acp_Solid_Tan_V_SmershVest_01_radio_Solid_Tan_F","acp_Solid_Tan_V_HarnessOGL_Solid_Tan_F","acp_Solid_Tan_V_HarnessO_Solid_Tan_F","acp_Solid_Tan_V_LegStrapBag_Solid_Tan_F","acp_Solid_Tan_V_ChestRigEast_Solid_Tan_F","acp_Solid_Tan_V_TacChestrig_Solid_Tan_F","ItemWatch","ItemMap","ToolKit","TFAR_anprc154","TFAR_microdagr","rhs_acc_pso1m21","acp_Solid_Tan_H_Bandanna_Solid_Tan","acp_Solid_Tan_H_Watchcap_Solid_Tan","acp_Solid_Tan_H_Booniehat_Solid_Tan","acp_Solid_Tan_H_Booniehat_Solid_Tan_hs","acp_Solid_Tan_H_Cap_Solid_Tan","acp_Solid_Tan_H_Cap_Solid_Tan_hs","acp_Solid_Tan_H_Cap_headphones_Solid_Tan","UK3CB_MDF_B_H_Off_Beret","ItemCompass","ACE_fieldDressing","ACE_adenosine","ACE_packingBandage","ACE_plasmaIV_250","acp_Solid_Tan_V_Chestrig_Solid_Tan"],[2,3,2,47,2,3,4,3,44,34,14,17,31,22,2,6,4,3,5,5,3,3,3,5,20,42,2,7,16,1,4,5,4,5,4,5,5,5,32,47,1,16,2,2]]]]; _Weapons = [[[["hlc_rifle_FAL5000_XMAG","HLC_Rifle_g3ka4_GL_XMAG","hlc_rifle_M14_XMAG","launch_RPG7_F","KA_dagger","UK3CB_BHP","rhs_weap_ak74n","UK3CB_SVD_OLD","hlc_rifle_g3a3vris_XMAG","arifle_AKM_F","KA_SilverBaller_L","rhs_weap_ak74n_gp25","uk3cb_enfield_no3","rhs_weap_rpg26","Binocular"],[20,2,4,3,20,4,4,1,4,1,1,3,1,3,10]]]]; _Magazines = [[[["rhs_mag_20Rnd_762x51_m61_fnfal","UK3CB_G3_20rnd_762x51_GT","hlc_50Rnd_762x51_T_G3","1Rnd_HE_Grenade_shell","UGL_FlareWhite_F","rhsusf_20Rnd_762x51_m118_special_Mag","rhs_rpg7_PG7V_mag","rhs_rpg7_OG7V_mag","MiniGrenade","SmokeShellRed","SmokeShellPurple","SmokeShellBlue","ACE_HandFlare_White","ACE_HandFlare_Red","SatchelCharge_Remote_Mag","rhs_30Rnd_545x39_7N10_AK","rhs_10Rnd_762x54mmR_7N1","UK3CB_RPK74_60rnd_545x39_R","rhs_mag_20Rnd_762x51_m80_fnfal","rhs_mag_rgd5","rhs_mag_rdg2_white"],[13,14,3,29,10,10,5,6,16,3,6,6,5,5,7,7,8,7,3,3,6]]]]; _Backpacks = [[[["acp_Solid_Tan_B_LegStrapBag_Solid_Tan_F","acp_Solid_Tan_B_RadioBag_01_Solid_Tan_F","acp_Solid_Tan_B_TacticalPack_Solid_Tan","UK3CB_ADG_O_B_RIF"],[3,2,5,1]]]]; call { ammobox addItemCargo _Items; ammobox addWeaponCargo _Weapons; ammobox addMagazineCargo _Magazines; ammobox addBackpackCargo _Backpacks }; 1c.) Then paste this into a trigger to execute at the start of the mission. (this doesn't work) 2.) It would be nice not to have to manually do all of this. Instead, would there be a way to automatically export these three arrays into a document in the mission folder from one trigger? 2a.) Have a trigger that executes a file on mission start (which has been updated from the step above at previous mission end). I would be happy for either solution, I just don't want to have to take screenshots/recordings of the contents of the ammobox and manually add each one in the "Equipment Storage" tab. Thanks in advance, Aurora
  7. Excellent job with this. I have been trying to find out how to do this for over a year... It works perfectly, apart from one thing. How would I use this if I wanted to different polygons on the map? i.e A green zone and a red zone? I have managed to change the colour, but can only get one polygon to show at a time.
  8. aurora1-4

    Creating Looped Sounds

    Yeah, I thought the same also. Tried deleting the object but the sound continued, strangely. The sound files are pretty short anyway so i'm content with how it currently is. Thanks anyway though!
  9. aurora1-4

    Creating Looped Sounds

    Didn't need it originally. Was just using this as a page to bookmark for when I come back to it in the future. However, do you know of a way to stop a playSound3D loop half way through a loop. I wanted to use it for both a generator and a siren. The generator loop starts from the mission start and has a holdaction to disable it which should stop the sound immediately although, it continues the loop until the sound file is complete. The sirens are dependent on the "alive generator". If the sirens are playing and the generator is disabled, then the sirens should also stop immediately, but the same thing happens.
  10. I am literally posting this because I lost the piece of code and spent hours trying to come up with an alternative. call { _null = [] spawn {for "_i" from 1 to 999 do { playSound3D [getMissionPath "" + "sound\workshop.ogg", e1, false, getPosASL e1, 5, 1, 50]; sleep 60; }; }; };
  11. aurora1-4

    playSound3D Help...

    Or would I just have to put... _null = [] spawn {for "_i" from 1 to 240 do { playSound3D [getMissionPath "soundz\radio.wav", radio, false, getPosASL radio, 1, 1, 15]; sleep 30; }; }; with nothing in the init.sqf? This one seems to have worked! Hurray! Thankyou @Erwin23p and @h - for all the help! Very much appreciated!
  12. aurora1-4

    playSound3D Help...

    So would I just have to put... private _root = getMissionPath ""; ...into my init.sqf and then put... _null = [] spawn {for "_i" from 1 to 240 do { playSound3D [_root + "soundz\radio.wav", radio, false, getPosASL radio, 1, 1, 15]; sleep 30; }; into the trigger?
  13. aurora1-4

    playSound3D Help...

    I see. I have put the condition to... alive radio ...as I have an action on the radio to be able to turn it off via setting its damage to 1. I have pasted the loop in with this condition but still no sound? Now im getting an error undefined variable "MISSION_ROOT"...
  14. aurora1-4

    playSound3D Help...

    @Erwin23p Just pasted that in the trigger and I'm still getting the same error? "Error type Array, expected Number" with the # before playSound3D. EDIT: I was just being an idiot. fixed the error. However, sounds still not playing. EDIT2: The sound files are only 30 seconds long to reduce file size. This may be the problem. I have the trigger set for anybody inside zone and repeatable. Would this repeat the sound as it finishes or would I have to create a loop to keep repeating the sound after 30 seconds? If so, how?
  15. aurora1-4

    playSound3D Help...

    Hi @Erwin23p, thanks for responding. 🙂 I have put the function into the init.sqf and put the script into the trigger to activate the sounds. However, I am now getting an error on mission start saying that: playSound3D [MISSION_ROOT + "soundz\radio.wav", radio, [], [], [], [], 15]; This is returning an error for an array whilst its expecting a number? Any ideas? Regards, Aurora
×