-
Content Count
1304 -
Joined
-
Last visited
-
Medals
Everything posted by twirly
-
Use \n for a break (linefeed) in a hint. Hint "This is one line\nThis is the next"; gives:- This is one line This is the next
-
I will see what I can do to post something... but the scripts are heavily dependent on a whole bunch of other stuff. I will have to try to trim a lot out. @TJ72 ... pretty much the same for me. I did find after trying many different things that disabling the pilots FSM worked wonders. I think I still have every command you can think of in there to try to make them follow "my" orders...but the disabling of the FSM seemed to be the one that worked. Not 100%....but at least the plane flies over the target now! I also vector the bomb to target...so is a single bomb...precision strike. EDIT: I agree that we should have total control of the AI.... I don't understand why we don't. One would think it would be easier to make them do nothing than to bob and weave and try to escape!
-
A word of advice mate. You're in trouble if you expect to find info on everything in this game clearly laid out for you. It doesn't work like that. I know it as ALT and E...but you're welcome to try every single key combo on you keyboard if you like. Why not just buy Arma 2 and support BIS!
-
It's the only way I can finally get my AI planes to fly directly into danger to drop bombs reliably. Works a treat.
-
Arma 2 : OA beta build 84868
twirly replied to gossamersolid's topic in ARMA 2 & OA - BETA PATCH TESTING
The AI are walking through each other....especially in battle. -
Stop thinking! Did you try ALT and E in the Main Menu (first menu)? That's the way you get into the 3D editor! If it does not work.... well then it does not work in Arma 2 Free.
-
Hit ALT E in the main menu to get to the 3D Editor. This works in the full version...not sure about Arma 2 Free.
-
Random placing of vehicles
twirly replied to frosties's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Found this post.... hope it helps you. http://forums.bistudio.com/showpost.php?p=1739823 -
sideChat player kills XXXXX
twirly replied to Skagget's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Just a wild shot at this....but do you have the Functions Module placed on the map? -
Get number of building positions?
twirly replied to celery's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Good to know. I didn't have problems.... but was using the few buildings on Utes and a lot of testing with Tigeria. Also towns generated with GITA seem to work OK. I have a little search script I wrote that I was testing.... and eventually they will search how-many-ever hundred positions successfully! EDIT: I did notice that in some buildings the same positions would be searched over and over again. The AI that was doing the searching would eventually finish though... and move on. -
Ammo crate filled with MOD special weapons/ammo
twirly replied to Kommiekat's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
These are the Classnames out of the JSDF config. Weapons and magazines are at the bottom:- Units : (J.G.S.D.F) JGSDF_Soldier_noarmor JGSDF_Soldier JGSDF_Officer JGSDF_Soldier_SL JGSDF_Soldier_TL JGSDF_Soldier_MG_MINIMI JGSDF_Soldier_MG_62 JGSDF_Soldier_AT_84RR JGSDF_Soldier_AT_LMAT JGSDF_Soldier_AT_110mm JGSDF_Soldier_Sniper_64 JGSDF_Soldier_Sniper_64nv JGSDF_Soldier_Sniper_24 JGSDF_Medic JGSDF_Soldier_Crew_New JGSDF_Soldier_Crew_Old JGSDF_Soldier_Pilot JGSDF_Soldier_AB JGSDF_Soldier_SL_AB JGSDF_Soldier_TL_AB JGSDF_Soldier_MG_MINIMI_AB JGSDF_Soldier_MG_62_AB JGSDF_Soldier_AT_84RR_AB JGSDF_Soldier_AT_LMAT_AB JGSDF_Soldier_AT_110mm_AB JGSDF_Soldier_Sniper_24_AB JGSDF_Medic_AB (J.M.S.D.F) JMSDF_Soldier_Crew JMSDF_Soldier_Pilot (J.A.S.D.F) JASDF_Soldier_Crew JASDF_Soldier_Pilot Backpack : JGSDF_Backpack1 JGSDF_Backpack2 Weapon&magazine : JSDF_W_R_Type89,JSDF_W_R_Type89_F -> JSDF_M_R_Type89_30R,JSDF_M_R_Type89_20R JSDF_W_R_Type64,JSDF_W_R_Type64s,JSDF_W_R_Type64nv -> JSDF_M_R_Type64 JSDF_W_MG_MINIMI -> JSDF_M_MG_Minimi_200R JSDF_W_MG_Type62 -> JSDF_M_B_7_62x51_M13_100R JSDF_W_Throw -> JSDF_M_HG_JM26A1 JSDF_W_P_9mm -> JSDF_M_P_9mm JSDF_W_RR_84mm -> JSDF_M_RR_84mm_FFV551_HEAT,JSDF_M_RR_84mm_FFV441_HE JSDF_W_LR_110mmLAM -> JSDF_M_LR_110mmLAM_JM12 JSDF_W_LM_Type01LMAT -> JSDF_M_LM_Type01LMAT Ammobox : JSDF_BasicWeapons EDIT: I used pboView to get to it. -
Get number of building positions?
twirly replied to celery's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hmmmm.... don't have that problem here. I can get them to go to all positions (generated from the script) in all buildings in my testing. They will use doors and ladders no problems. I'm running OA with the latest beta.... not sure if that has anything to do with it. You just never know! -
Making 'minefield' triggers
twirly replied to Lucky44's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Try this for your trigger... this && ((getpos (thislist select 0)) select 2 <=1); -
Arma 2 : OA beta build 84868
twirly replied to gossamersolid's topic in ARMA 2 & OA - BETA PATCH TESTING
Well....I guess the point is this. If you can interrupt that animation...or any animation at all...then why can't you interrupt other animations? -
Arma 2 : OA beta build 84868
twirly replied to gossamersolid's topic in ARMA 2 & OA - BETA PATCH TESTING
If you can run and reload why can't you (I should say AI also) die when shot? What I mean is if you are running and you hit reload...the reload animation starts right away. When you die...the current animation plays out first. Throwing the grenade....switching weapon....putting away the binocs etc. It's been like this for many, many years. Also not a good look! Time to fix ya think? -
Arma 2 : OA beta build 84868
twirly replied to gossamersolid's topic in ARMA 2 & OA - BETA PATCH TESTING
I find the animations a bit disjointed at distance in SP....as though they skip some frames. Not a good look. -
Get number of building positions?
twirly replied to celery's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
The highest and lowest and then all the points in between for each building wouldn't be that hard to find... but I don't think you can know for certain if a point is on the roof or not. That is....whether the building actually has roof positions. It might be that most of the enterable buildings have roof positions... I don't know. -
Random placing of vehicles
twirly replied to frosties's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Try this mate. This is the way I thought of doing that was fairly easily. Whatever you have within a 20m radius of your Shilka will be deleted and recreated at the new location along with the Shilka. You can change the 20 meters easily in the script. Look for the line:- _list = (_shilkas select _i) nearObjects 20; ..and change the 20. The only thing is...some stuff does not come across properly. You'll have to experiment to see what works and what does not. Sandbags... for instance end up spread out for some reason. I don't think it's my code... so I dunno what causes that. It's not perfect because of this and I'm not happy.... but anyway....it's something for you at least. //make arrays for the shilkas and markers _shilkas = [shilka_01,shilka_02,shilka_03]; _markers = ["mkr_01","mkr_02","mkr_03","mkr_04","mkr_05","mkr_06","mkr_07","mkr_08"]; _list = []; _shilkapos = [0,0,0]; //loop through the shilkas for "_i" from 0 to (count _shilkas)-1 do { //get list of objects near shilka _list = (_shilkas select _i) nearObjects 20; _list = _list - [_shilkas select _i]; //get shilkas position _shilkapos = position (_shilkas select _i); _things = []; _relpos = [0,0,0]; //save the objects positions relative to the shilka for "_j" from 0 to (count _list)-1 do { _relpos = [(_shilkapos select 0) - ((getpos (_list select _j)) select 0),(_shilkapos select 1) - ((getpos (_list select _j)) select 1),0]; _things set [count _things,[typeOf (_list select _j),_relpos,direction (_list select _j)]]; deleteVehicle (_list select _j); sleep 0.01; }; //select the marker _mkr = _markers select (floor (random (count _markers))); //move the shilkas (_shilkas select _i) setpos (getMarkerPos _mkr); //get shilkas position _shilkapos = position (_shilkas select _i); //restore the objects at their new locations for "_j" from 0 to (count _things)-1 do { _thing = _things select _j; _typeof = _thing select 0; _relpos = _thing select 1; _direct = _thing select 2; _obj = _typeof createVehicle ([(_shilkapos select 0) - (_relpos select 0),(_shilkapos select 1) - (_relpos select 1),0]); _obj setdir _direct; sleep 0.01; }; //spawn group of 5 _grp = [getMarkerPos _mkr, EAST, 5] call BIS_fnc_spawnGroup; //remove the marker from the list so it can't be used again _markers = _markers - [_mkr]; sleep 0.01; }; EDIT: To stop the crashing you need to offset the objects you are spawning relative to the Shilka. There's code in what I posted that shows the math. -
[ADO] Tigeria : Island, Units & Vehicles
twirly replied to oldbear's topic in ARMA 2 & OA - ADDONS & MODS: COMPLETE
Must say...I absolutely love the terrain. Yesterday I found a patch of land that was below sea level. I know this because I have a script that spawns a Zodiac if the player ends up deep enough in water. Well I was walking along and "poof".... there was my Zodiac!!...I could also hear the sound of waves! Cannot find the spot again easily...I've been trying. When I do I will update the post with the location. It might be intentional that some land locked areas are below sea level....If it is disregard the post. I can adjust my script. More:- If this has been mentioned already I apologies for not reading the whole thread.... but I found this "over road cables (vee)" just hanging in the sky. Zero gravity! It's over the back wall of those buildings South West of Laguna. The pix should help. http://www.mediafire.com/imgbnc.php/b65a771a5c7a905b59a53ca03ab57a8d56209ee7cd30c6fbd47bb96640aa58b76g.jpg http://www.mediafire.com/imgbnc.php/8fd0c2b073ce875036fca9399de1e1b6c85efbf02818699a40da2a6be3cbc8e16g.jpg -
Random placing of vehicles
twirly replied to frosties's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
This would be a way to do it using a little script. The Shilkas and Markers must have names. Here... 3 Shilkas will be placed randomly on 3 of 8 markers. A marker won't be used twice. Groups of 5 will also be spawned at each Shilkas new position. Call this from somewhere...preferably your init.sqf like this:- nul = [] execVM "place_shilkas.sqf"; Create a file called "place_shilkas.sqf" in your mission folder. You must have the Functions Module placed on the map. place_shilkas.sqf:- //make arrays containing the shilkas and markers _shilkas = [shilka_01,shilka_02,shilka_03]; _markers = ["mkr_01","mkr_02","mkr_03","mkr_04","mkr_05","mkr_06","mkr_07","mkr_08"]; //loop through the shilkas for "_i" from 0 to (count _shilkas)-1 do { //select a random marker _mkr = _markers select (floor (random (count _markers))); //move a shilka (_shilkas select _i) setpos (getMarkerPos _mkr); //spawn group of 5 at the marker/shilka position _grp = [getMarkerPos _mkr, EAST, 5] call BIS_fnc_spawnGroup; //remove the marker from the list so it can't be used again _markers = _markers - [_mkr]; sleep 0.01; }; EDIT: Added a demo mission for you. -
Script request (Artillery and Mortar)
twirly replied to Addetter's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Well then learn to use the Artillery Module! With a little perseverance you'll figure it out. http://community.bistudio.com/wiki/Artillery_Module#Example_Missions -
Get number of building positions?
twirly replied to celery's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
If you already have your building (_build) then :- _cnt = 0; _posarray = []; //as long as building position _cnt not equal to "[0,0,0]" keep looping while {format ["%1", _build buildingpos _cnt] != "[0,0,0]" } do { _pos = _build buildingpos _cnt; //select building position _cnt _posarray = _posarray + [_pos]; //add the position to the list _cnt = _cnt + 1; //increment counter sleep 0.01; }; _posarray will contain all the positions...in position format. They can be added as Waypoints....or used for doMove. -
isNil, empty array and empty group issue
twirly replied to wiggum2's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
BIS_fnc_nearestPosition doesn't work with groups...it needs objects for the input.... Something like this works fine:- _grpTargets = [s1,s2,s3]; _grpToHunt = [_grptargets, player] call BIS_fnc_nearestPosition; hint format ["%1",_grpToHunt]; s1,s2 and s3 are individual soldiers! I've left your variable name (_grpToHunt) the same...but it needs changing since we are not dealing with a group. EDIT: Added.... Here's a function to get the nearest groups of a certain side within a specific radius ....if it helps. It currently ignores groups in Air and Sea vehicles. Preprocess the file (in your init.sqf):- groupsNear = compile preprocessFileLineNumbers "fn_findGroupsNear.sqf"; Call with something like this:- _neargroups = [player,100,EAST] call groupsNear; ...and the actual function.... fn_findGroupsNear.sqf:- private ["_obj","_rad","_sid","_pos","_list","_group","_i","_dude","_groups"]; _obj = _this select 0; _rad = _this select 1; _sid = _this select 2; if (typename _obj == "OBJECT") then {_pos = getpos _obj} else {_pos = _obj}; _list = []; _groups = []; _list = nearestObjects [_pos,["Man","Car","Tank"],_rad]; for "_i" from 0 to ((count _list) - 1) do { _dude = _list select _i; _dude = leader group _dude; if (_sid == side _dude) then { _group = group _dude; if (not(_group in _groups)) then {_groups set [(count _groups),_group]}; }; }; _groups EDIT: Fixed the code above...I had somehow pasted it twice!! -
Script request (Artillery and Mortar)
twirly replied to Addetter's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
You might want to look here and take the time to learn how to use the Simple Support Module. I'm not too sure you'll get someone to write you that script you're after. http://forums.bistudio.com/showthread.php?t=101872 -
This is a good idea for the snipers....it needs to be automatic. JTD Hide.... http://www.armaholic.com/page.php?id=13037