-
Content Count
1304 -
Joined
-
Last visited
-
Medals
-
Samaels Table - small addon made by my 6 year old son
twirly replied to [frl]myke's topic in ARMA 2 & OA - ADDONS & MODS: COMPLETE
Keep up the good work Samael.... excellent! Great stuff Myke! -
Adding and removing objects & Connect message.
twirly replied to ben_sherman's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Not sure exactly what you are trying to do.... but deleteVehicle is used to delete objects. -
Need help with editing
twirly replied to hellstorm77's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
It works perfectly.... how are you doing your testing?. You are probably getting an error because you are testing in the editor. Paramsarray does not work in Single Player. Save it as a multiplayer mission and test in COOP. It will work. Demo .pbo here. Put it in your MPMissions folder and start a COOP game with it. -
Naming a unit when you spawn it through a trigger
twirly replied to clydefrog's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I placed a marker, a trigger and a unit with this in his init.. groupalpha = group this; and used that line in the trigger and everything worked fine. Check everything again... it's something simple. -
Audible range of default sounds
twirly replied to Harzach's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Try leaving out the quotes in the titles lines... so... titles[] = {}; -
Off shore bombardment script?
twirly replied to sixt's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Read this thread man..... http://forums.bistudio.com/showthread.php?142833 -
Need help with editing
twirly replied to hellstorm77's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Look at the lines directly above the error and make sure there's nothing wrong there. -
Need help with editing
twirly replied to hellstorm77's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
What's the error? It looks OK....don't see anything wrong really. Maybe brackets around paramsArray select 0 but don't think it's necessary. But if all else fails... try everything you didn't try! Just to check... the Class params statements needs to be in your description.ext... and put the setDate in your init.sqf -
Simple Bomb defusal with keypad
twirly replied to igneous01's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Ask in the DayZ forums. -
vehicle spawn init help
twirly replied to xgamer224's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
That looks like lines from the mission .sqm! Don't mess with that file.... there is rarely a need to ever open it. Read up on this command... http://community.bistudio.com/wiki/setVehicleInit ...or better yet read Mr Murrays Editing Guide and learn the basics. -
Detect if unit if AI or player controlled?
twirly replied to colej_uk's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Also... check out... playableunits (for multiplayer) switchableunits (for singleplayer) I've been using something like this that works in both SP and MP. _controllableAI = []; _controllableAI = [] call { _array = []; if (isMultiplayer) then { _array = playableunits; } else { _array = switchableunits; }; _array }; //more code here for whatever... //blah... //blah... //blah... if (_unit in _controllableAI) then { hint format ["%1 is playable",_unit]; } else { hint format ["%1 is not playable",_unit]; }; -
How to name vehicle spawned in BIS_fnc_SpawnVehicle ???
twirly replied to Lucky44's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
No worries man... I had a little error with the _heloTroop1 variable... calling it _helogroup in one line! It's been fixed. -
How to name vehicle spawned in BIS_fnc_SpawnVehicle ???
twirly replied to Lucky44's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Try it like this....no need for setvehiclevarname! ... also don't use "_x" in a for statement it's reserved for the foreach statement. Use "_i", "_j", "_k" etc. instead (standard programming practice). //create the helo _testHelo1 = [getMarkerPos "mrk_WPtest0", 10, "LIN_UH1", west] call bis_fnc_spawnvehicle; Helo98 = _testHelo1 select 0; //move each group member into Helo for "_i" from 0 to (count units _heloTroop1)-1 do { _unit = (units _heloTroop1) select _i; _unit assignasCargo Helo98; _unit moveInCargo Helo98; sleep 0.2; }; ... another way of moving in the troops using foreach... {_x assignascargo Helo98; _x moveincargo Helo98} foreach units _heloTroop1; -
Blah.... bad idea! No point.
-
Need help with Arrays (Also random-related)
twirly replied to MrSanchez's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Something like this using "weighted arrays".... the last number in the array is the actual weight. _rifles = [ ["MR43","2Rnd_shotgun_74Slug",0.01], ["Winchester1866","15Rnd_W1866_Slug",0.01], ["LeeEnfield","10x_303",0.01], ["huntingrifle","5x_22_LR_17_HMR",0.05], ["FN_FAL","20Rnd_762x51_FNFAL",0.10] ]; Then.... _weighted = []; //rifles for "_i" from 0 to (count _rifles)-1 do { _weight = (_rifles select _i) select 2; _weight = round(_weight * 100); for "_j" from 0 to (_weight - 1) do { _weighted set [count _weights,_j]; }; sleep 0.003; }; _randrec = _weighted select floor (random (count _weighted)); _rifle = (_rifles select _randrec) select 0; _ammo = (_rifles select _randrec) select 1; This is similar to how it's done in DayZ...except there it's a function. Here it's part of the script. It creates huge arrays of numbers....but works. I have a better way.... just haven't written the code as yet.