

riouken
Member-
Content Count
570 -
Joined
-
Last visited
-
Medals
Everything posted by riouken
-
You have to use event handlers and scripts, here is how we did it for my units rifle range: define the round count varable in the init: rounds_fired_p = 0; you will need one for each player, ie. p1,p2 in this example p1 addEventHandler ["Fired", {rounds_fired_p1 = rounds_fired_p1 + 1; _handler = [p1, rounds_fired_p1] execVM "RoundCounter.sqf"; if(rounds_fired_p1 == 5) then { rounds_fired_p1 = 0; };}]; here is the script: // This script counts the number of rounds fired and when it reaches 5 it delets the magazine and replaces it. // Simulates 5 rounds per magazine. _unit = _this select 0; _rounds_fired = _this select 1; if(_rounds_fired == 5) then { {_unit removemagazine _x} forEach magazines _unit; _unit addMagazine "30rnd_556x45_stanag"; }; _unit = nil; _rounds_fired = nil; This is for 5 round magazines but im sure you can see where to change it to make it 15 rounders.
-
Issue with ACE Ruck's + Wounds
riouken replied to ArmAddict's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
How are you adding the ruck? with addWeapon ? That command should remove it. How are you calling the command? In a script or the init of the unit? Can you post the exact code your using in your mission so we can check it. -
ctrlSetStructuredText syntax
riouken replied to riouken's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I just tested it and that does not work either. I know the dialog box works because I changed the starting text to this: class timer: RscStructuredText { idc = 1100; [color="Red"]text = "Test";[/color] colorBackground[] = { 1, 1, 1, 1 }; x = 0.751116 * safezoneW + safezoneX; y = 0.775602 * safezoneH + safezoneY; w = 0.0896484 * safezoneW; h = 0.0425 * safezoneH; }; And Test showed up just fine, I just cant seem to change the text after the dialog is up. -
Yes if you want the targets to stay up for a set time you could do something like this: _targets = [t1_1,t1_2,t1_3,t1_4,t1_5,t1_6,t1_7]; {_x animate["terc", 1]} forEach _targets; hint "Range is setting up, Get ready to fire!"; sleep 8; hint "Begin firing!"; {_x animate["terc", 0]} forEach _targets; sleep 15; {_x animate["terc", 1]} forEach _targets; hint "Range is complete."; Or you could put them up with one script and put them down with another if you want to control it your self.
-
use this in the init.sqf or an init field of one of the targets. This will stop all popup targets from popping back up. nopop=true; You can control popup targets state by using this in a trigger or script. 0 is up and 1 is down. target_name_here animate["terc", [color="Red"]0[/color]];
-
Create Ammo dump at one of 5 random positions?
riouken replied to stephen271276's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
You dont have to group them, just name them for example: box1, box2, etc... then in the condition field of your trigger where your checking if they are alive: !(alive box1) and !(alive box2) and !(alive box3) and !(alive box4) and !(alive box5) -
Random yet specific span location?
riouken replied to kocrachon's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
:) Thanks for all the help Demonized, glad to have you in the community. -
Random yet specific span location?
riouken replied to kocrachon's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
if (!isServer) exitWith {}; private ["_pos1","_pos2","_pos3","_pos4","_pos5","_pos6","_posarray","_random_bomb_pos"]; _pos1 = [coords, go, here]; _pos2 = [coords, go, here]; _pos3 = [coords, go, here]; _pos4 = [coords, go, here]; _pos5 = [coords, go, here]; _pos6 = [coords, go, here]; _posarray = [_pos1,_pos2,_pos3,_pos4,_pos5,_pos6]; _random_bomb_pos = (_posarray select (floor(random(count _posarray)))); /// You now have a random bomb postion just use the variable: _random_bomb_pos You beat me to it Demonized, lol. Nice multi dimensional array,btw. I started to make one but was not sure if he would understand it. -
Functions and Destroy City
riouken replied to victim913's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
You can call this from a script or trigger. ["destroyBase",500,42,[bis_vila]] call bis_fnc_destroyCity "destroyBase" : in this case is a marker. You can place a marker down in the city and that will be the epicenter of destruction. you can also use a location or object. [bis_vila] : is an array of buildings that will not be destroyed. The last three parameters are optional. It will use the defaults if you do not define them. So all you really need to do use this function is define the location. place a marker down named "doomedcity" then execute this in a trigger ["doomedcity"] call bis_fnc_destroyCity; -
Trigger function issue
riouken replied to VirusLIVED's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
You really do not need that script. Just create a master array of uid's for each class: init.sqf: mypilotarray = ["2233445","12345456"]; // Place your predefined pilots uid's in here. mytankerarray = ["5238464","65432141"]; mytrigger: condition: this On activation; playercheck = (getPlayerUID (thislist select 0));if (playercheck in mypilotarray) then {infantryGate1 animate ["barGate",0];}; On deactivation: infantryGate1 animate ["barGate",0]; Just change that trigger for each class that you need. This is not tested but should get you going in the right direction. -
Trigger function issue
riouken replied to VirusLIVED's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
yes it would be a good idea. I always use incorrect spellings, that way I know what it means but it does not corrupt anything else. ie. ( truckz ) -
Trigger function issue
riouken replied to VirusLIVED's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
its because the array(The way you have it coded it is not even an array, its just a string.) in f2fmembers.sqf is a string and pilot is an object. an array should be formated like this: myobjectarray = [pilot1,pilot2]; mystringarray = ["pilot1","pilot2"]; http://community.bistudio.com/wiki/String http://community.bistudio.com/wiki/object what are you trying to do with this script exactly? are you trying to set up a "class" system for your predefined members? -
Trigger function issue
riouken replied to VirusLIVED's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
you have to use this command http://community.bistudio.com/wiki/in_Array pilot in myarray I have never tested it in a condition field though. -
Some problems with removing the addactions for everyone
riouken replied to JacobJ's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Yes you need to place this at the end of attach_ammoboxhum1.sqf hum1jumbo = false; publicVariable "hum1jumbo"; As to why the addAction is not removing for all players, Post addActionW.sqf so that we can take a look at it, I suspect your problem is in there. -
Help needed: running two instances of ArmA to test multiplayer scripting
riouken replied to Preacher1974's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
use the command: -noPause in one of your command lines. -
Enable/Disable Ammobox Param Help
riouken replied to Phantom Six's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
http://community.bistudio.com/wiki/deleteVehicle -
UAV problems
riouken replied to =101AD=Richard's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
UAV's are pretty dumb, if your on Takistan make sure your setting the flying height to account for the mountains, Use AGL. I think you can use this command to resync the uav to the module/player after respawn. http://community.bistudio.com/wiki/synchronizeObjectsAdd -
Enable/Disable Ammobox Param Help
riouken replied to Phantom Six's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
In description.ext : class d_mybigammobox { title = "Extra Ammo:"; values[] = {0,1}; default = 0; texts[] = {"No","Yes"}; }; mybigammobox.sqf : if (!isServer) exitWith{}; waitUntil {time > 1}; if (d_mybigammobox == 0) exitWith{}; if (d_mybigammobox == 1) then { _myammobox1 = createVehicle ["USBasicWeaponsBox",getMarkerPos "myammomarker1", [], 0, "NONE"]; }; in init.sqf : [] execVM "mybigammobox.sqf"; then just create a marker called "myammomarker1", where you would like the ammobox to spawn. This is not tested, but I think that is right. -
Editing, Expanding and Modifying Domination
riouken replied to Tankbuster's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
RF3_LOG\config.sqf "Land_HBarrier1", "Land_HBarrier3", "Land_HBarrier5", "Base_WarfareBBarrier5x", [color="Red"]"Land_HBarrier_large",[/color] // Delete this line to remove the large h barrier, Its line 411. -
AddMagazine Group Player
riouken replied to ios's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Here ya go. _weaponMagazine = currentMagazine player; {_x addmagazine _weaponMagazine } forEach units group player; -
Placing Buildings in Editor
riouken replied to scroll_tro0l's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I have tried a lot of different walls/fences/etc... but the best thing I have found is large H-Barriers. Not the prettiest butt it works the best for zoning off a section. I make a small section maybe 5 or 6 H-Barriers long get them all placed right and looking good, then I just copy and paste, and then make any small corrections to the overall fence. -
Placing Buildings in Editor
riouken replied to scroll_tro0l's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I think it says OAhouses or something like that, its been a few months since I have used it. But its pretty easy to figure out. Now the BIS naming scheme for the buildings is not..lol you will just have to place and test to find the one you need. :) -
Placing Buildings in Editor
riouken replied to scroll_tro0l's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Only the person placing them down needs the addon, after the mission is made, you dont need it nor do the clients. -
Placing Buildings in Editor
riouken replied to scroll_tro0l's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Here ya go: http://www.armaholic.com/page.php?id=11668 -
Fixing a Popup Script
riouken replied to unknownx9's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
This script was designed to select a few random targets from a large list of targets and pop them up. So you cant just copy and pastes snip-its of code and expect it to work. It needs to be rewritten to do what you want it to do. This is not tested and the scoring probably will not work like that( I normally use eventHandlers to score) but this will get you heading in the right direction. I didn't know how you were going to differentiate between the different sets of targets so I just put a 15 second pause in between each course. _inc = 0; _count = 0; _target1 = [AR1,AR2,AR3,AR4]; _target2 = [AR5,AR6,AR7,AR8]; _target3 = [AR9,AR10,AR11,AR12]; _target4 = [AR13,AR14,AR15,AR16]; _many = (count _targets1) + (count _targets2) + (count _targets3) + (count _targets4); _SoldierOne = player; _pass = 16; // number of targets you are required to hit. {_x animate["terc",1]} forEach _targets1; {_x animate["terc",1]} forEach _targets2; {_x animate["terc",1]} forEach _targets3; {_x animate["terc",1]} forEach _targets4; _soldierOne groupChat "Welcome to the firing range"; sleep 5; _soldierOne groupChat "Setting up the Range"; sleep 2; _soldierOne groupChat "The Qualification Course will begin in 2 Seconds"; sleep 2; _soldierOne groupChat "Begin!"; // First set of targets. {_x animate["terc",0]} forEach _targets1; // I dont know if the scoring will work like this, I normaly use eventhandlers to score. if ({_x animationPhase "terc" > 0.1} forEach _targets1) then { _count = _count+1; }; sleep 15; //Second set of targets. _soldierOne groupChat "Next Round Starts Now!"; {_x animate["terc",0]} forEach _targets2; if ({_x animationPhase "terc" > 0.1} forEach _targets2) then { _count = _count+1; }; sleep 15; //Third set of targets. _soldierOne groupChat "Next Round Starts Now!"; {_x animate["terc",0]} forEach _targets3; if ({_x animationPhase "terc" > 0.1} forEach _targets3) then { _count = _count+1; }; sleep 15; //Fourth set of targets. _soldierOne groupChat "Next Round Starts Now!"; {_x animate["terc",0]} forEach _targets4; if ({_x animationPhase "terc" > 0.1} forEach _targets4) then { _count = _count+1; }; _soldierOne groupChat format ["Targets :%1 Hit :%2",(_inc+1)*3,_count]; sleep 2; _inc = _inc + 1; }; sleep 2; _soldierOne groupChat "Session Complete"; sleep 1; _soldierOne commandChat format ["%1",_count]; //if (_count >= _pass ) then {_soldierOne commandChat "Congratulations you have passed";} else {_soldierOne commandChat "Sorry you must do better";};