-
Content Count
768 -
Joined
-
Last visited
-
Medals
Everything posted by dragonsyr
-
Variables in list help needed
dragonsyr replied to dragonsyr's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@ shuko. ok fixed... follow my last post above for the lights problem... thank you -
play sounds on object position?????
dragonsyr replied to dragonsyr's topic in ARMA 3 - MISSION EDITING & SCRIPTING
i notice that the playsound3d is for static objects because if the object is on the move , then the sound hears to the position that you call the sound ex. you r pilot flying and you call the sound like this if you want to hear the sound , you must stop to the position that you call the script. how can i stick the sound source to the player until the sound ends?? -
spawning and deleting objects on other object radius (help)
dragonsyr replied to dragonsyr's topic in ARMA 3 - MISSION EDITING & SCRIPTING
ok i got it if (isNil {missionNamespace getVariable "hlight"}) then { hlight_array = []; // Define once if ((count hlight_array) == 0) then { _chemlight = _lightType createVehicle [getPos _helitarget select 0, getPos _helitarget select 1,1]; _ang = 0; _rad = 6.5; //radius _outrad = 15; _bcount = 9; //number of lights _outbcount =9; _inc = 360/_bcount; for "_i" from 0 to _bcount do { _a = (_target_pos select 0)+(sin(_ang)*_rad); _b = (_target_pos select 1)+(cos(_ang)*_rad); _a1 =(_target_pos select 0)+(sin(_ang)*_outrad); _b1 = (_target_pos select 1)+(cos(_ang)*_outrad); _pos = [_a,_b,_target_pos select 2]; _pos1 = [_a1,_b1,_target_pos select 2]; _ang = _ang + _inc; _light = "Land_runway_edgelight" createVehicle _pos; //Chemlight_green //Land_runway_edgelight _light setPos _pos; hlight_array set [(count hlight_array), _light]; // Add to array hlight_array set [(count hlight_array), _chemlight]; }; for "_i" from 0 to _outbcount do { _a1 =(_target_pos select 0)+(sin(_ang)*_outrad); _b1 = (_target_pos select 1)+(cos(_ang)*_outrad); _pos1 = [_a1,_b1,_target_pos select 2]; _ang = _ang + _inc; _light1 = "Land_runway_edgelight" createVehicle _pos1; //Chemlight_green //Land_runway_edgelight _light1 setPos _pos1; hlight_array set [(count hlight_array), _light1]; missionNamespace setVariable ["hlight", hlight_array]; };};}; working ---------- Post added at 17:38 ---------- Previous post was at 17:34 ---------- i ll try that , but right now i want the circles separate, because i want to change the type of lights in each circle .... ---------- Post added at 17:45 ---------- Previous post was at 17:38 ---------- working perfect Thank you all :-) -
spawning and deleting objects on other object radius (help)
dragonsyr replied to dragonsyr's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thank you Sir !! working perfect... :-)))) ---------- Post added at 17:21 ---------- Previous post was at 16:56 ---------- how about if i can add another outer radius with more lights? i tried but no luck if (isNil {missionNamespace getVariable "hlight"}) then { hlight_array = []; // Define once if ((count hlight_array) == 0) then { //_lightc=_lightType createVehicle [getPos _helitarget select 0, getPos _helitarget select 1,1]; _chemlight = _lightType createVehicle [getPos _helitarget select 0, getPos _helitarget select 1,1]; _ang = 0; _rad = 6.5; //radius _outrad = 15; _bcount = 9; //number of lights _outbcount =9; _inc = 360/_bcount; for "_i" from 0 to _bcount do { _a = (_target_pos select 0)+(sin(_ang)*_rad); _b = (_target_pos select 1)+(cos(_ang)*_rad); _a1 =(_target_pos select 3)+(sin(_ang)*_outrad); _b1 = (_target_pos select 4)+(cos(_ang)*_outrad); _pos = [_a,_b,_target_pos select 2]; _pos1 = [_a1,_b1,_target_pos select 2]; _ang = _ang + _inc; _light = "Land_runway_edgelight" createVehicle _pos; //Chemlight_green //Land_runway_edgelight _light setPos _pos; _light1 setPos _pos; hlight_array set [(count hlight_array), _light]; // Add to array hlight_array set [(count hlight_array), _chemlight]; hlight_array set [(count hlight_array), _light1]; //missionNamespace setVariable ["hlight", hlight_array]; }; for "_i" from 0 to _outbcount do { _a1 =(_target_pos select 0)+(sin(_ang)*_outrad); _b1 = (_target_pos select 1)+(cos(_ang)*_outrad); _pos1 = [_a1,_b1,_target_pos select 2]; _ang = _ang + _inc; _light1 = "Land_runway_edgelight" createVehicle _pos; //Chemlight_green //Land_runway_edgelight _light1 setPos _pos; hlight_array set [(count hlight_array), _light1]; missionNamespace setVariable ["hlight", hlight_array]; };};}; this give me no errors , but no outer light circle -
spawning and deleting objects on other object radius (help)
dragonsyr replied to dragonsyr's topic in ARMA 3 - MISSION EDITING & SCRIPTING
i cant delete this way.... i keep the working one ... i have one more question in here i add one chem light in the center of the object.. if (isNil {missionNamespace getVariable "hlight"}) then { hlight_array = []; // Define once if ((count hlight_array) == 0) then { _ang = 0; _rad = 6.5; //radius _bcount = 9; //number of lights _inc = 360/_bcount; for "_i" from 0 to _bcount do { _a = (_target_pos select 0)+(sin(_ang)*_rad); _b = (_target_pos select 1)+(cos(_ang)*_rad); _pos = [_a,_b,_target_pos select 2]; _ang = _ang + _inc; _light = "Land_runway_edgelight" createVehicle _pos; //Chemlight_green //Land_runway_edgelight _light setPos _pos; _lightType createVehicle [getPos _helitarget select 0, getPos _helitarget select 1,1]; //is defined also as chemlight hlight_array set [(count hlight_array), _light]; // Add to array missionNamespace setVariable ["hlight", hlight_array]; };};}; on delete all lights desapear except the chemlight on center.....how can i delete this also ? -
spawning and deleting objects on other object radius (help)
dragonsyr replied to dragonsyr's topic in ARMA 3 - MISSION EDITING & SCRIPTING
can i define the in the script that spawn the lights?i want to remove this action (spawning) after the light script ends. (another sqf call the remove of lights) also i want the ability if isnil, because maybe the lights not exist when the other script run and call the delete of the lights also if exists i dont want to respaun again if the player run again the addaction for the lights creation ---------- Post added at 15:58 ---------- Previous post was at 15:25 ---------- i figure out and works if (isNil {missionNamespace getVariable "hlight"}) then { hlight_array = []; // Define once if ((count hlight_array) == 0) then { _ang = 0; _rad = 6.5; //radius _bcount = 6; //number of lights _inc = 360/_bcount; for "_i" from 0 to _bcount do { _a = (_target_pos select 0)+(sin(_ang)*_rad); _b = (_target_pos select 1)+(cos(_ang)*_rad); _pos = [_a,_b,_target_pos select 2]; _ang = _ang + _inc; _light = "Land_runway_edgelight" createVehicle _pos; _light setPos _pos; hlight_array set [(count hlight_array), _light]; // Add to array missionNamespace setVariable ["hlight", hlight_array]; };};}; and the remove command is if (!isNil {missionNamespace getVariable "hlight"}) then {{ hlight_array = hlight_array - [_x]; deleteVehicle _x; } forEach hlight_array; hlight = nil;}; so , no duplicate lights !! :-)) thank you ! -
Variables in list help needed
dragonsyr replied to dragonsyr's topic in ARMA 3 - MISSION EDITING & SCRIPTING
i know that, i can make it work without errors (comment the line in my code but i cant delete it .....what is the solution??? is out of subject here .... -
play sounds on object position?????
dragonsyr replied to dragonsyr's topic in ARMA 3 - MISSION EDITING & SCRIPTING
working !! thanks! ---------- Post added at 05:07 ---------- Previous post was at 03:42 ---------- -
Variables in list help needed
dragonsyr replied to dragonsyr's topic in ARMA 3 - MISSION EDITING & SCRIPTING
ok working but i cant delete light script if (isNil {missionNamespace getVariable "hlight"}) then { _ang = 0; _rad = 6.5; //radius _bcount = 6; //number of lights _inc = 360/_bcount; for "_i" from 0 to _bcount do { _a = (_target_pos select 0)+(sin(_ang)*_rad); _b = (_target_pos select 1)+(cos(_ang)*_rad); _pos = [_a,_b,_target_pos select 2]; _ang = _ang + _inc; _light = "Land_runway_edgelight" createVehicle _pos; _light setPos _pos; // lights set[_i, _light]; //only commented works for spawning missionNamespace setVariable ["hlight", _light]; };}; the lights spawned and is in place i want i try to delete with if (!isNil {missionNamespace getVariable "hlight"}) then {for "_i" from 0 to count(lights) - 1 do{ deleteVehicle (lights select _i); // i try also _light , hlight, no luck }; hlight = nil;}; but nothing happened...... and get this error if uncomment the line "lights set" -
addaction usage question
dragonsyr replied to dragonsyr's topic in ARMA 3 - MISSION EDITING & SCRIPTING
thank you semiconductor ! -
Can i pass commands from an addaction directly, and how? example _aa2 = Player addAction ['<t color="#FFF600">' + "something", "lines of code here, no use of execvm",["2"],1,false];
-
play sounds on object position?????
dragonsyr replied to dragonsyr's topic in ARMA 3 - MISSION EDITING & SCRIPTING
is this right? ex //.............................................defines.................... _sound1 = [(str missionConfigFile), 0, -15] call BIS_fnc_trimString; _soundToPlay1 = _sound1 + "sounds\sound_0.ogg";// your path goes here _sound2 = [(str missionConfigFile), 0, -15] call BIS_fnc_trimString; _soundToPlay2 = _sound2 + "sounds\sound_1.ogg";// your path goes here //.............................................................................. playSound3D [_soundToPlay1, _myobject1, true, getPos _myobject1, 10, 1, 50]; // this is the command for use ? playSound3D [_soundToPlay2, _myobject2, true, getPos _myobject2, 10, 1, 50]; // other command on same script //.............................................................................. -
Variables in list help needed
dragonsyr replied to dragonsyr's topic in ARMA 3 - MISSION EDITING & SCRIPTING
it is defined (i post only the line that i have problem) it is a helipad. no other variable error, i tried also with the name of the object but i get the same, the code is this and working as it is /* executed by initline of helipads; Original By MH6. [h1,6] execVM "scripts\runwaylights.sqf"; */ if(not local Server) exitWith{}; _target_pos = getPos (_this select 0); //helipad = "HeliHCivil" createVehicle _target_pos; //helipad setPos _target_pos; _ang = 0; _rad = 6.5; //radius _bcount = _this select 1; //number of lights _inc = 360/_bcount; for "_i" from 0 to _bcount do { _a = (_target_pos select 0)+(sin(_ang)*_rad); _b = (_target_pos select 1)+(cos(_ang)*_rad); _pos = [_a,_b,_target_pos select 2]; _ang = _ang + _inc; _light = "Land_runway_edgelight" createVehicle _pos; _light setPos _pos; }; if(true) exitWith{}; how can i do this run within my script as createvehicle ? ---------- Post added at 22:08 ---------- Previous post was at 22:03 ---------- i think that the problem is this i thought that with direct replace with my object would work. wrong guess is think .... i ll try again and post the results....... in a few hours -
Variables in list help needed
dragonsyr replied to dragonsyr's topic in ARMA 3 - MISSION EDITING & SCRIPTING
with this if (isNil {missionNamespace getVariable "hlight"}) then { lights=[]; // Array that stores all the created lights _ang = 0; _rad = 6.5; //radius _bcount = 6; //number of lights _inc = 360/_bcount; for "_i" from 0 to _bcount do { _a = (_helitarget )+(sin(_ang)*_rad); _b = (_helitarget )+(cos(_ang)*_rad); _pos = [_a,_b,_helitarget]; _ang = _ang + _inc; _light = "Land_runway_edgelight" createVehicle _pos; _light setPos _pos; lights set[_i, _light]; // Adds the object to the end of the array }; }; i get this error -
Hacker Crashing our Server without even connecting
dragonsyr replied to Desolate's topic in ARMA 2 & OA - MULTIPLAYER
i dont know if this helps but i post it http://smallbusiness.chron.com/report-illegal-website-hacking-48127.html -
mission sequence problem (on player disconect)
dragonsyr posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I have a unit preplaced from editor. when the mission begin, i have an addaction for the players , that can use this unit (movements, waypoints) so far so good. while alive player everything is under control because the script continues. i want ,if the player is dead or disconected for some reason, the unit go back to the initial position and some actions that made before killing or disconnection also remove.(ex. spawned vehicles ) how can i do that? edit: also how can i lock the unit so when a player use it , the other players cant ? same thing here..... i need to unlock when player dies or disconected-
- ai skill
- difficulty
-
(and 1 more)
Tagged with:
-
Variables in list help needed
dragonsyr replied to dragonsyr's topic in ARMA 3 - MISSION EDITING & SCRIPTING
thank you albert, i ll try that asap ---------- Post added at 12:41 ---------- Previous post was at 12:38 ---------- ps also, do you know who is the blue runway light? because Land_runway_edgelight is the yellow one.. -
Variables in list help needed
dragonsyr replied to dragonsyr's topic in ARMA 3 - MISSION EDITING & SCRIPTING
how can delete an object created from a previous script this way if (isNil {missionNamespace getVariable "hlight"}) then { _light = _lightType createVehicle [getPos _helitarget select 0, getPos _helitarget select 1,1]; missionNamespace setVariable ["hlight", _light]; i try with if (!isNil {missionNamespace getVariable "hlight"}) then{deletevehicle _light;hlight = nil;}; but i get this error on delete "Error Undefined variable in expression: _light" edit : OK false alarm ..... my mistake in the code...... working perfect......thanks ---------- Post added at 18:57 ---------- Previous post was at 17:59 ---------- another question. how can i do this if (isNil {missionNamespace getVariable "hlight"}) then {_hlight=[ _ang = 0; _rad = 6.5; //radius _bcount = 6; //number of lights _inc = 360/_bcount; for "_i" from 0 to _bcount do { _a = (_helitarget )+(sin(_ang)*_rad); _b = (_helitarget )+(cos(_ang)*_rad); _pos = [_a,_b,_helitarget]; _ang = _ang + _inc; _light = "Land_runway_edgelight" createVehicle _pos; _light setPos _pos; };];}; i need to make a light circle that i can delete after like this -
play sounds on object position?????
dragonsyr replied to dragonsyr's topic in ARMA 3 - MISSION EDITING & SCRIPTING
thank you F2k , i ll try that... -
play sounds on object position?????
dragonsyr replied to dragonsyr's topic in ARMA 3 - MISSION EDITING & SCRIPTING
i need this fade distance param ---------- Post added at 18:20 ---------- Previous post was at 18:19 ---------- @ F2k sel my mistake sorry iceman :-) speaker playsound3d "c\sounds\mysound.ogg" //no errors but i cant hear nothing. -
play sounds on object position?????
dragonsyr replied to dragonsyr's topic in ARMA 3 - MISSION EDITING & SCRIPTING
ok i make a test. i put the pole 2 miles away and it broadcast the sound... 2 miles for 50%sound loss ?????????????????? ok its working .... i need to lower db's i think.... its not only the code that i made but requires many files (sounds and other scripts) give me some time please so to have something for public right now everything is a total mesh :-))))) i try to figure out how things working please give me some time -
play sounds on object position?????
dragonsyr replied to dragonsyr's topic in ARMA 3 - MISSION EDITING & SCRIPTING
this give me an error missing ; -
play sounds on object position?????
dragonsyr replied to dragonsyr's topic in ARMA 3 - MISSION EDITING & SCRIPTING
i need the player , in this case as driver , to speak in the chopper and the other players can hear the sound. next sound in code sequence is one sound to the speaker pole say3d . when i do that, when i m in heli and im 500 meters away of the pole, i hear the sound of the pole loud and clear. i dont know if the sound broadcasting from the pole. with this hears only the caller. i cant see in this code where play the sound . i need speakers for multiplayer not singleplay.---------- Post added at 17:59 ---------- Previous post was at 17:57 ---------- what this does?? -
Variables in list help needed
dragonsyr replied to dragonsyr's topic in ARMA 3 - MISSION EDITING & SCRIPTING
thank you, i ll try some tests and i post the results.... -
Variables in list help needed
dragonsyr replied to dragonsyr's topic in ARMA 3 - MISSION EDITING & SCRIPTING
where i must put the 1st table code? , in the c/init.sqf , or in the c/start.sqf --in my case, i call from my_mission init.sqf my c\init.sqf and from there i add the addaction for the first time , in a loop with a waituntil command, that on "true" executes the script itself.So, c\init.sqf call many other scripts when some cases triggered. i need to understand how can i remove "things" or use "things" from past scripts as the story goes. i hope that you understand what i mean . Excuse me for my English ..... and my vision need server interaction (dedicated server missions)