-
Content Count
1304 -
Joined
-
Last visited
-
Medals
Everything posted by twirly
-
MP compatible: Illuminate Helipads for incoming heli's, HOW???
twirly replied to BelgarionNL's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Try something like this.... _height is the height you want the chopper at. _pos = getpos helipad2; _spawnpos = [_pos select 0,_pos select 1,[b][i]_height[/i][/b]]; _ride = createVehicle ["UH60M_EP1", _spawnpos, [], 0, "NONE"]; -
Pulled back into vehicle on radioTrigger
twirly replied to AndroidSpawn's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I may be wrong....but don't think that should happen unless they are all in the same group. Are the guys driving and commanding the Bradley in the same group as the guys being dropped off by the Bradley? EDIT: After reading this again and pondering a little.... if they have been assigned as cargo... then I think yes... they will need to be unassigned. -
MP compatible: Illuminate Helipads for incoming heli's, HOW???
twirly replied to BelgarionNL's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I don't see anything in that code that spawns anything! If you want the helicopter flying... then you have to spawn it flying using "FLY" _ride = createVehicle [_veh, _pos, [], 0, "FLY"]; createVehicle array -
Triangulated, scripted waypoints between 2 dynamic points
twirly replied to ADuke's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Knocked this up quickly for you.... and tested it. Test mission here. call with:- nul = ["mkr_1","mkr_2",100] execVM "test.sqf"; where... "mkr_1" and "mkr_2" are your markers... and 100 is the distance from the first marker along the azimuth to the second marker. test.sqf:- _mkr1 = _this select 0; _mkr2 = _this select 1; _deltadis = _this select 2; _x1 = (getMarkerPos _mkr1) select 0; _y1 = (getMarkerPos _mkr1) select 1; _x2 = (getMarkerPos _mkr2) select 0; _y2 = (getMarkerPos _mkr2) select 1; //get deltas _dx = _x2 - _x1; _dy = _y2 - _y1; //get angle between markers _ang = _dx atan2 _dy; //fix angle if <0 or >360 _ang = _ang mod 360; //find new coords _newx = _x1 + sin(_ang)*_deltadis; _newy = _y1 + cos(_ang)*_deltadis; _newcoords = [_newx,_newy,0]; hint format ["newcoords: %1",_newcoords]; //draw a marker here _mkr = format ["mkr_%1", diag_ticktime]; //give it a unique name _m = createMarkerLocal [_mkr, _newcoords]; _m setMarkerShapeLocal "ELLIPSE"; _m setMarkerSizeLocal [20,20]; _m setMarkerColorLocal "colorRED"; _m setMarkerDirLocal 0; If you choose a distance in the call that is more than the distance between the markers.... a projection along the calculated azimuth will be done. This point will lie outside of the line between the two markers. This may not be an ideal solution for you....but shows you the math. The distance should really be a percentage of the whole I guess.... but this will get you on your way. If you have trouble with it... I'll be glad to help. -
That's good. Welcome to your infinite trip down the Rabbit Hole!
-
I got some code in an email...you must have put it here and then removed it. I see you had two init.sqf's. Well you can only have one. It is executed once at mission start. Here is basically what you need. This test mission has three planes and nine groups.... three in each plane. There are many different ways to do this. This is just one approach. http://www.mediafire.com/?9b7oyo7t79n2cjz You've spent a lot of time on this... so should be able to figure out what's happening. Good luck!
-
Keep trying and keep reading. Lots of reading.... it will take some time but eventually things will start to make sense.
-
Use the example mission I posted for you and make more planes.... more groups.... and more waypoints....and copy the existing scripts. Simply give the new groups and planes new names....do some copying and pasting and fiddling with the scripts and use the new names. If that also doesn't work.... go back to Post #2! It's becoming hard to understand why you can't follow this! EDIT: Here's another example I found that I had done for someone some time ago... http://www.mediafire.com/?sj170sq0bjw4mde Still only one plane... so you are going to have to figure out the rest!
-
count units in vehicles
twirly replied to mcmatthew7898's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hi... see if this will help you out. http://community.bistudio.com/wiki/assignedCargo -
Here mate...I did a little demo mission for you. http://www.mediafire.com/?xt454fp9xyzi230 Unzip the file and place the unzipped folder in your missions folder. The missions folder should be in your My Documents\Arma 2\ folder You Should end up with a folder called My Documents\Arma 2\missions\Test_Para_Drop.utes Load it into the editor and run it. Look at the what happens in the demo... then look at the waypoints, code and comments and see if you can follow it. You cannot do what you want to do without scripts and some scripting knowledge.
-
Hmmm...let's see. Maybe you only executed the script on one squad....but I'm sure you could have probably figured that out yourself. Post the code you're using... let's see what's wrong with it.
-
This post here makes it very clear... http://forums.bistudio.com/showpost.php?p=1334005&postcount=1
-
Ejecting troops from a plane is very easy! The fact that "nothing works" suggests to me that you need to do a little more reading. It appears that you know so little that it would be hard to help you. As mentioned above....read Mr. Murrays editing guide! You must understand the fundamentals before any help will make sense to you!
-
Minor Multiplayer Creation Question
twirly replied to klaki892's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hi mate. Yes it is possible. Have a look here:- http://community.bistudio.com/wiki/disableAI_%28description.ext%29 ...and more specifically...the disableAI command here:- http://community.bistudio.com/wiki/disableAI_%28description.ext%29#disableAI -
Well done. Seems to work flawlessly now. I'll be using this from now on. Thanks for doing this...it's been something on the back burner for me for quite a while.... but now I'll just use yours :)
-
I'm getting strange results. The switching is different for different guys. For a soldier with a Rifle and Grenades I can't seem to switch back to the Rifle once I switch to Grenades. For a soldier with a Rifle, Launcher and Grenades I can switch between the Launcher and the Grenades no worries... but never to the Rifle. Something weird is going on. I don't have much time these days for scripting... but will have a think and a fiddle as soon as I can.
-
The current grenade/smoke selection method in the game is just plain shite. My real life AR-15 does not have "grenades" or "smoke" on the fire selector. In RL I wouldn't have to keep going in circles to select and throw grenades. I think your script will certainly solve this for a lot of us that don't like the current setup.
-
Most useful for sure!
-
Downloading now.... nowhere else to say this so will say it here. Hope you guys at BIS have a very Merry Christmas and a Happy New year! Much deserved.
-
FRL Airforce Addons release thread
twirly replied to [frl]myke's topic in ARMA 2 & OA - ADDONS & MODS: COMPLETE
These looks great. Thanks Myke! -
ARMA 2: Operation Arrowhead 1.60 RC #3b (Release Candidate)
twirly replied to Dwarden's topic in ARMA 2 & OA - BETA PATCH TESTING
Seems that things get a bit sluggish when using any weapon on full zoom! Place any man on any Island and fully zoom the weapon and look around. Mouse feels very different...and panning/looking around is jittery. -
Random position inside trigger area
twirly replied to iceman77's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
No worries mate. One thing though.... I guess I should have named the function/script fnc_getLocsInMkr instead... as it also return points on a grid and not only random points. I thought I'd just clear that up for other people reading this thread. -
Random position inside trigger area
twirly replied to iceman77's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
You can try this also... It's straight out of a mission I was working on so not pretty... but I'm just back from vacation so too stuffed to dick around with it right now. Can be modified to do triggers as well. Right now only works with markers. It's a function. I'm assuming here that you know about implementing functions... so no instructions on making it work! And unless I'm missing something in the commands. Yes...it's more complicated than you might think. Different shaped markers/triggers with different rotations and dimensions make it a bit troublesome. Having said that... the code here is more than you actually need, but it does more than you need :) call with:- //find 100 random points within the marker area _locs = [_mkrnam,[100]] call fnc_getRandMkrLocs; or... //find points on a 10x10 grid within the marker area.... so 100 points _locs = [_mkrnam,[10,10]] call fnc_getRandMkrLocs; or... //find 100 random points with a gradient of no more than 0.15 //that will fit a vehicle like wtank1 _locs = [_mkrnam,[100],wtank1,0.15] call fnc_getRandMkrLocs; or... //find points on a 10x10 grid within the marker area with a gradient of no //more than 0.15 that will fit a vehicle like wtank1 _locs = [_mkrnam,[10,10],wtank1,0.15] call fnc_getRandMkrLocs; Hope you get some joy out of it! -
multiplayer error message ?
twirly replied to morgans762's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Some advice.... make a copy of your mission.sqm before you change anything in it! That way if you screw it up you'll have a backup. -
weapon replacement script
twirly replied to Militant1006's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
You can try something like this loop here. As it is here it should be easy enough to follow... _allunits = allunits; for "_i" from 0 to (count _allunits)-1 do { _unit = _allunits select _i; if (side _unit = [b]EAST[/b]) then { nul = [_unit] execVM "replace_weaps.sqf"; }; sleep 0.01; }; ....or to to change weapons for different soldier types (classes).... maybe something like this and have a different script for each class.... _allunits = allunits; for "_i" from 0 to (count _allunits)-1 do { _unit = _allunits select _i; if (side _unit = [b]WEST[/b]) then { if (typeOf _unit == "USMC_SoldierS_SniperH") then {nul=[_unit] execVM "chweaps\sd_mk12sd.sqf"}; if (typeOf _unit == "USMC_Soldier_Pilot") then {nul=[_unit] execVM "chweaps\wsnip107.sqf"}; if (typeOf _unit == "USMC_Soldier_M16A2") then {nul=[_unit] execVM chweaps\sd_L115A3.sqf"}; }; sleep 0.01; }; EDIT: You can also use switch to do away with all the separate if checks for typeOf _unit.