Jump to content

PartyHead

Member
  • Content Count

    146
  • Joined

  • Last visited

  • Medals

Everything posted by PartyHead

  1. I'm still a learner when it comes to my scripting so I'm at a bit of a blank with this. Yeah I've never heard of addValue either and i only just edited my 1st post before you replied to also highlight addClass which i can't find anywhere aswell. Using Kronzky's script example I tried these and it doesn't work. // name of existing CfgSFX class that is used _sound = "Wind3_EP1"; // name of new class that's created _newClass = format["SFX_%1",_sound]; // add the new class (inherited from base class "Sound") _newSound = (configFile>>"CfgVehicles") addClass [_newClass,"Sound"]; // define the sound source _newSound addValue ["sound", _sound]; sleep 1; _wind = createSoundSource ["Wind3_EP1", player modelToWorld [0,10,0], [], 0]; sleep 1; [centre, 120, centre, 5, true] execVM "sandstorm.sqf"; // name of existing CfgSFX class that is used _sound = "Wind3_EP1"; // name of new class that's created _newClass = format["SFX_%1",_sound]; // add the new class (inherited from base class "Sound") _newSound = (configFile>>"CfgVehicles") addClass [_newClass,"Sound"]; // define the sound source _newSound addValue ["sound", _sound]; sleep 1; _wind = createSoundSource ["SFX_Wind3_EP1", player modelToWorld [0,10,0], [], 0]; sleep 1; [centre, 120, centre, 5, true] execVM "sandstorm.sqf";
  2. @Demonized Thanks mate i did this and it seems to work. _vehicle = _this select 0; _side = _this Select 1; if (_side == EAST) then { [color="Red"]if (squadLeaderEast != player) exitWith {};[/color] hqe = _vehicle addAction ["Head Quarters Menu", "module\menu_items\HQ_east_dialog.sqf"]; }; if (_side == WEST) then { [color="Red"]if (squadLeaderWest != player) exitWith {};[/color] hqw = _vehicle addAction ["Head Quarters Menu", "module\menu_items\HQ_west_dialog.sqf"]; }; Do i also add this aswell like this ? [color="Red"]if ((isServer) && !(local player)) exitwith {};[/color] _vehicle = _this select 0; _side = _this Select 1; if (_side == EAST) then { if (squadLeaderEast != player) exitWith {}; hqe = _vehicle addAction ["Head Quarters Menu", "module\menu_items\HQ_east_dialog.sqf"]; }; if (_side == WEST) then { if (squadLeaderWest != player) exitWith {}; hqw = _vehicle addAction ["Head Quarters Menu", "module\menu_items\HQ_west_dialog.sqf"]; };
  3. Hello everyone i need some help. Ive got a script that adds an action to an object and i want to make it so that it only shows for one specific player. addAction.sqf _vehicle = _this select 0; _side = _this Select 1; if (_side == EAST) then { hqe = _vehicle addAction ["Head Quarters Menu", "module\items\HQ_east_dialog.sqf"]; }; if (_side == WEST) then { hqw = _vehicle addAction ["Head Quarters Menu", "module\items\HQ_west_dialog.sqf"]; }; Ive tried this. addAction.sqf _vehicle = _this select 0; _side = _this Select 1; if (_side == EAST) then { while {true} do { if ((squadLeaderEast distance _vehicle) < 3) then { hqe = _vehicle addAction ["Head Quarters Menu", "module\items\HQ_east_dialog.sqf"]; }; }; }; if (_side == WEST) then { while {true} do { if ((squadLeaderWest distance _vehicle) < 3) then { hqw = _vehicle addAction ["Head Quarters Menu", "module\items\HQ_west_dialog.sqf"]; }; }; }; But it didnt work. Can anyone help.
  4. Thanks mate that works perfectly Thanks for the quick response :cc:
  5. Hello everyone, i need some help. How would i go about counting the number of units in a group and then setting that number as a setvariable. So far ive got this: init.sqf troop_count_west = 0; coin setvariable ["troop_count_west"]; And in a create_group.sqf script i create five units that spawn and join the players group, so i put this in the script: create_group.sqf troop_count_west = 5; publicvariable "troop_count_west"; Which works perfectly. But ive got a para_drop.sqf script that creates a random number of units between five and ten that spawn and join the players group that im having trouble with. So far ive tried this highlighted in red: para_drop.sqf // CREATE DROP UNIT fnc_CreateDropUnit = { private ["_pilot","_class","_caller","_pos","_para","_drop"]; _pilot = _this select 0; _class = _this select 1; _caller = _pilot getVariable "fnc_SupportCaller"; _pos = position vehicle _pilot; _class createunit [_pos, group _pilot, "_drop = this", 0.5 + random 0.5]; _para = fnc_UnitsParachute createVehicle _pos; _para setpos [_pos select 0,_pos select 1,(_pos select 2) -1]; _drop moveinDriver _para; _para setVelocity [((velocity vehicle _pilot) select 0)/3, ((velocity vehicle _pilot) select 1)/3,((velocity vehicle _pilot) select 2)/3]; WaitUntil{(getpos _para select 2) < 0.1}; moveout _drop; sleep 1; { _x setSkill Aiskill; _x setVehicleInit "_null = [this,player] execVM ""squads\troop.sqf"";"; processInitCommands; } foreach units _drop - [_pilot]; [color="Red"]troop_count_west = {alive _x} count units group _drop - [_pilot]; publicvariable ["troop_count_west"];[/color] }; This didnt work:shrug: Anyone able to help ? Cheers PartyHead.
  6. Thats just part of my paradrop script, dont worry about that it works fine i just used that part of it to show what im trying to do with the setvariable. The part that ive added that i carnt get to work i highlighted in red.
  7. Yeah i tried that myself and could'nt get it to work. Doing what i said above was the only way i could make vehicle changes. Changes like for example how many artillery rounds: BIS_SSM_Artillery_ROUNDS_WEST = 12; and BIS_SSM_Mortar_ROUNDS_WEST = 8; seem to work when added to your missions init.sqf file.
  8. You could do what i did, I went in to my program files\Bohemia Interactive\Arma 2\Expansion\AddOns folder and found the modules_e PBO file then UN-PBO that and find the SSM folder, there is only two .sqf files in there. One is for the radio messages and the other is the main init file which is where everything is difined which is were you can make your changes. I for example wanted to change the ammo drop chopper to a chinook, works perfectly. So after you've made your changes put the UN-PBO SSM folder in your missions folder and add this to the init.sqf of your mission []execVM "SSM\data\scripts\init.sqf"; and run the SSM module as a script version. I used an un-pbo tool called Eliteness to un-pbo the module_e pbo file. Hope this helps.
  9. The latest version of @CBA addon fixed it. :) But now the asr_vfai, AI rearming addon doesn't work. :( :confused: hope the asr_vfai Project team do an updated version, that is if it is actually conflicting with the latest version of @CBA, which is an requirement. Also, off topic, I'm getting a lot of AI walking around in a small circle, in formation, and i have to tell the squad to stop to get the ones doing that to stop. :confused::confused:
  10. Can anyone tell me what this warning means ? Ever since the new patch i get this hintC message. When i try and run addons like @CBA and @ACE mods etc. What do i need to do to fix it ? Ive looked at the bug tracker and searched this forums posts back quite a ways, im sure there's been a post about it somewhere, but i havent found anything yet. :confused2:
  11. @DMarkwick. Thanks for your reply mate. Since my original post, ive worked it out. It needs to be like this: fun=["z3",[3,0,0],[2,3,10,8],[],[],[],[0,2,3,0]] spawn DAC_Zone;nul=["z3","[color="Red"][] execVM ""tsk1.sqf""[/color]"]execVM "CreateSector.sqf"; Cheers.
  12. About the DAC sector fight setup, the createSector.sqf states that, My question is, with the "nameOfTheScript" part, how is it done ? Is it just like this, fun=["z3",[3,0,0],[2,3,10,8],[],[],[],[0,2,3,0]] spawn DAC_Zone;nul=["z3","tsk1"]execVM "CreateSector.sqf"; "tsk1" is the name of the .sqf script that i want to run. Could someone give me an yes or no on this please.
  13. Had a play with the demo script, and it looks good mate. Have a look at this : http://www.armaholic.com/page.php?id=9140 And i know this is an addon, and i know how much you like addons! but have a check into how these guys have done it. Might help. http://www.armaholic.com/page.php?id=7356 Cheers.
  14. Download this mission demo: http://www.filefront.com/15288933/lkscriptsv08.rar/ Its called "lkscriptsv08. It allows you to create an FOB and buy items in construction mode, like in Warfare Game Mode. All works perfectly in Arma2, how ever the vehicle drop and ammo drop scripts don't work properly in Combined Operations. All you have to do is build your mission around the lkscritps FOB. The lkscripts FOB at anytime can be packed up and made movable, just by driving the LAV25 HQ to a new location and re-deploying the FOB. Have a play with the demo mission and you'll soon work it all out. It also has a money system which allows you to buy items and expand your base, when the money runs out a chopper will fly more in, you need to purchase a helipad for the supply chopper to start re-supplying you with money. Download this mission: http://www.armaholic.com/page.php?id=11647 this is an excellent Warfare Game Mode Mission. Anyway i thought that these missions might help or suite your needs.
  15. PartyHead

    Civilian kill Counter

    You could have a look here : http://community.bistudio.com/wiki/count And here : http://community.bistudio.com/wiki/Category:Scripting_Commands_ArmA2 For a start. If you already know some scripting, this will help.
  16. Hi everyone, Ive got a problem with a supply drop script i use and have been using for quite awhile. Since the latest patch it doesent seem to work anymore, and my scripting skills are still very limited as im still learning. So i thought i would post it here to see if someone, can tell me what has changed in the latest patch in regards to this script. _droppoint = "dropzone"; _dropzone = createMarkerLocal ["dropzone", [0,0,0]]; _dropzone setMarkerShapeLocal "ICON"; "dropzone" setMarkerTypeLocal "Destroy"; "dropzone" setMarkerText "Ammo Dropzone"; "dropzone" setMarkerColor "ColorRed"; mapclick = true; hint "Click on the map to designate a dropzone."; onMapSingleClick "'dropzone' setMarkerPosLocal _pos,mapclick = false"; waitUntil{!mapclick}; onMapSingleClick ""; waitUntil{!visibleMap}; amo = true; _pos = getmarkerpos "dropzone"; spawntype0 = "USSpecialWeaponsBox"; spawntype1 = "USVehicleBox"; spawntype2 = "USSpecialWeaponsBox"; _dir = 90; _airtype = "C130J"; _type = "GUE_Soldier_Pilot"; mygroup = creategroup side player; _target = createVehicle ["testsphere2",[_pos select 0,_pos select 1,-10], [], 0, "FLY"]; _target setpos [_pos select 0,_pos select 1,200]; _target setDir _dir; _vdir = vectorDir _target; _target setpos [(_pos select 0) + (_vdir select 0) * 26, (_pos select 1) + (_vdir select 1) * 26,200]; _apos = getposasl _target; _npos = [(_pos select 0) + (_vdir select 0) * -1500, (_pos select 1) + (_vdir select 1) * -1500, 300]; _vehicle = createVehicle [_airtype,_npos, [], 0, "FLY"]; _vehicle setpos _npos; _vehicle setDir _dir; _vehicle setvelocity [(_vdir select 0)*50,(_vdir select 1)*50, 5]; _type createUnit [_npos, mygroup,"pilot=this;"]; _pilot = pilot; _pilot moveindriver _vehicle; _pilot reveal _target; _pilot doMove _npos; _pilot dotarget _target; _pilot dowatch _target; _pilot FlyInHeight 400; _vehicle FlyInHeight 400; while {_vehicle distance _target > 40} do { sleep 0.1; if(_vehicle distance _target < 600) then { _pilot FlyInHeight 100; _pilot doMove _npos; }; }; _bpos = _vehicle ModelToWorld [0,-12,-5.5]; _bomb = spawntype0 createVehicle _bpos; _bomb setpos _bpos; _bomb setDir direction _vehicle; _chute = "ParachuteMediumWest" createVehicle getpos _bomb; _chute setpos (_bomb ModelToWorld [0,0,3]); _bomb attachTo [_chute,[0,0,2.5]]; sleep 0.2; _bpos = _vehicle ModelToWorld [0,-12,-5.5]; _bomb = spawntype1 createVehicle _bpos; _bomb setpos _bpos; _bomb setDir direction _vehicle; _chute = "ParachuteMediumWest" createVehicle getpos _bomb; _chute setpos (_bomb ModelToWorld [0,0,3]); _bomb attachTo [_chute,[0,0,2.8]]; sleep 0.2; _bpos = _vehicle ModelToWorld [0,-12,-5.5]; _bomb = spawntype2 createVehicle _bpos; _bomb setpos _bpos; _bomb setDir direction _vehicle; _chute = "ParachuteMediumWest" createVehicle getpos _bomb; _chute setpos (_bomb ModelToWorld [0,0,3]); _bomb attachTo [_chute,[0,0,2.4]]; deletevehicle _target; sleep 0.05; _plane FlyInHeight 250; sleep 1; _plane FlyInHeight 450; _pilot doMove [(_pos select 0) + (_vdir select 0) * 800, (_pos select 1) + (_vdir select 1) * 800, 500]; sleep 15; amo = false; deletevehicle _vehicle; deletevehicle _pilot; deletemarker "dropzone"; Whats happening is that everything works perfectly except now the C130J wont drop its cargo, it just flys over the droppoint and nothing. Sorry if this code is too long, i wasnt sure how much of a script can be posted. Anyway any help would be greatly appreciated.
  17. Hello everyone. I need some help with the "Construction Interface Module", ive placed a module on the map of my CTF mission and set the variables in its init box using these instructions: http://community.bistudio.com/wiki/Construction_Interface Everything seems to work properly, i get the construction action when im in range of the module, and i can go into construction mode and buy and place items within the construction area, thats all good, but when i right click to leave construction mode, i leave, but the categories GUI remains on screen and the transparent construction area walls remain visible, i also cant fire my weapon after this has happened, and the construction menu action also remains, even when im out of range of the module, but when i try and use it to access construction mode again, it does not work, i just remain stuck like ive discribed. Can anyone please help.
  18. @Foxhound, I still cant access the website. I get a webpage telling me to flush my web cache. Ive followed those instructions, which dont cover windows 7 by the way, and i still cant access the site. Great stuff up mate, what am i suppose to do now ?
  19. In a PvP mission can i place different radio triggers down and have them assigned to different sides. A radio trigger that only shows for the Blue side, and a radio trigger that only shows for the Red side ? If i can could anyone please help me with what i need to do ? Im thinking i have to edit the Condition box of each trigger some how Ive looked through the BIS Scripting Commands, but im still pritty new to it all and am still learning. Thanks in advance. PartyHead.
  20. Firstly thanks for this awsome mod Mandoble. Was wondering if you could help me out, im creating a Commander Console, and as part of its function ive included a "launch UAV","Dismiss UAV" and "MQ9Predator" Buttons. The UAV scripts im using are "Doolittle's" dynamic UAV. Once you launch the UAV you get a hint telling you that the MQ9Predator can now be used, then you click the "MQ9Predator" button in the console to access the UAV camera display. You can Launch and Dismiss the MQ9Predator any number of times. Once launched, the MQ9Predator will Circle between 2 points {pointA and pointB} untill shot down or dismissed. What i was wondering is could your "TV Hellfire UAV system" work with this setup instead of Doolittle's BIS_UAV_1 display ? Im still learning scripting so my scripting skills are limited. If this is at all possible any help would be greatly appreciated. Here's a link to Doolittle's example scripts: http://www.armaholic.com/page.php?id=8506 Thanks, PartyHead.
  21. Could someone put me in the right direction as to what and where i can learn how to make AI choppers take off and return and land in the same place.Im only new to the mission editor and dont know alot yet, but i can place choppers, say three for eg., one of which i pilot, and when i take off the others will to, and stay in formation, but when i land they stay in the air, also how do i set different altitude's for the chopper waypoints ? And scripting how do i learn all about that ? For example what do i have to learn to be able to create stuff like this: Sorry if this is all Noob stuff and been asked before, but ive got to start somewhere. I love this game and really want to learn how to use the editor etc. so any help would be greatly appreciated. Cheers:cheers:
×