-
Content Count
359 -
Joined
-
Last visited
-
Medals
Everything posted by Lucky44
-
How to spawn Takistani militia groups in CO
Lucky44 replied to Lucky44's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Aha! Yes, that makes sense. Using the config rather than the side name. Thanks! -
How to spawn Takistani militia groups in CO
Lucky44 posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I'm running Combined Operations, and I want to spawn groups of Takistani militia (or GUER insurgents, really...just some non-regular army insurgent types). I'm using BIS_fnc_spawnGroup. And I can only get it to create Taki regular army. If I try to spawn resistance, it creates Arma2 (Russian) style insurgents. I tried using the Faction instead of the Side, but that didn't work. Any ideas how to get the Takistani non-regulars to spawn using BIS_fnc_spawnGroup? -
What's wrong with this code? (one line)
Lucky44 replied to Lucky44's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hmm. Yes, I know that Select needs an array. And yes, trigger is a number. In my current tests, it's always 1. These lines work fine: _spawnSet = _spwnPt select trigger; // pick the array of possible spawn points for the right trigger area; "trigger" is a global variable determined in the on-map trigger hint format ["_spawnSet is now %1",_spawnSet]; and show that the script is picking the 2nd element of the array _spwnPt properly. The trouble comes when it tries to use that element, "_SP1", as an array itself soon after. I fear it's trying to use it as a string rather than the array name. But I'm not sure how to change that. I tried changing the array _SP1 from ["spwn1a","spwn1b",etc] to [spwn1a,spwn1b,etc] but that didn't work. The arrays are all shown. I don't see a problem with them; do you? -
What's wrong with this code? (one line)
Lucky44 replied to Lucky44's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Sorry, Demonized. I had tried making some variables Global and local, but it makes no difference in this situation. So it should be all local variables, except trigger, which is set in the on-map trigger, as I added in an edit. ALSO: The error that is showing via Show Script Errors is "Error select: Type string, expected Array,Config entry" - so the problem is something to do with how I'm using _spawnSet in the line _spawnSet select _spawnroll; I tried making it _spwn = (_spwnPt select trigger) select _spawnroll; but that didn't help at all; it DID make the error message different, though. -
How to spawn Takistani militia groups in CO
Lucky44 replied to Lucky44's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I should have put my code in...I'm using this _SpawnGrp = [getMarkerPos _spwn, RESISTANCE, 9,[],[], [1,1,1]] call BIS_fnc_spawnGroup; I see no way to use BIS_TK_INS...I had tried putting that in instead of RESISTANCE, but nothing spawned. -
Continuous Enemy spawn.
Lucky44 replied to Easelm's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
If you look up BIS_fnc_SpawnGroup in the BIS wiki, you'll find this entry. The number 3 in that example (above) is the number of units that will be (randomly) spawned. -
The Art of Warfare [TAW] EU/USA
Lucky44 replied to Jyden's topic in ARMA 2 & OA - SQUADS AND FANPAGES
Update: We're currently operating 4 servers (we've added a Chicago test server), and we're getting ready to add a bigger, better EU server. The Arma division of The Art of Warfare currently has over 150 members, mostly in North America and Europe. As Jyden said, TAW is a group that stresses teamwork and respect. We're not hardcore military types, but we have a number of current and retired service members from various countries, in various branches. Check us out at TAW.net! -
addAction to object after moving it - troubles
Lucky44 posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I'm trying to use addAction to put a simple script to "take" a notebook computer if the players find it. I have the notebook start on the map, and I am then moving the notebook to a random place each time the mission is run. I've tried adding the action in the notebook's init box, and that works fine until I move it to the random location (via a setPos command). And I've tried adding the action AFTER moving the object, but it won't show the added action. Any clues about what I'm doing wrong? Here's the code, fwiw: _intel_marker1 = (getMarkerPos "mrk_intel1"); // used to move the bunker and table to _intel_marker2 = (getMarkerPos "mrk_intel2"); // used to spawn the team guarding the intel bunker1 setPos _intel_marker1; sleep 1; table1 setPos _intel_marker1; sleep 0.2; table1 setPos [getPos table1 select 0, getPos table1 select 1, 0.3]; sleep 2; notebook1 setpos [getpos table1 select 0, getpos table1 select 1, 1.1]; sleep 1; _take_intel = notebook1 addAction ["Take the intel laptop", "take_laptop.sqf"]; And btw, I'm going to run this on a dedicated server, eventually. -
addAction to object after moving it - troubles
Lucky44 replied to Lucky44's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Got it! Thanks for your time and help. -
addAction to object after moving it - troubles
Lucky44 replied to Lucky44's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Sorry, you've lost me. I'm not sure what you mean by grouping markers to objects...never done that (I can guess HOW to do it, but what's the effect?). And I'm not sure what you mean by how the addAction in the init line would "work" with all that. Could you please explain? ---------- Post added at 10:16 PM ---------- Previous post was at 10:11 PM ---------- OK, my initial problem is solved: the action did not disappear, but when the notebook computer was on top of a table, in the large bunker, the action was not visible unless I maneuvered to a very specific place. It was appearing above the roof of the bunker. So it was never being removed from the object, but it is extremely hard to notice/find the text for the action. One problem solved, but now I have to figure out how to change that! I'll try putting the action on the able, to see if that helps lower it. EDIT: That works fine. I guess the "center" of the notebook, sitting on the table, must have been significantly higher than the "center" of the table. -
addAction to object after moving it - troubles
Lucky44 replied to Lucky44's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thanks for that, SHK. Trouble is, even when I add it in the object's Init box, once the object gets moved, it loses the action. That's what is really stumping me. EDIT: I did a test, and if I just move the notebook to the player location, (using "setPos (getPos player)" ), it retains the action. EDIT: And one more note: it's only when the table and notebook are inside the bunker that the Action on the notebook disappears. Now why would that be? -
Checking unit name in Radio Trigger???
Lucky44 posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I'm trying to limit the use of a radio trigger (e.g., Radio Alpha) to 3 units. I can do it using Player names, but I can't figure out how to limit it by unit names. And I can do it in an area trigger, but not a radio one. I know there must be a way, but I can't see it! Any ideas? -
Checking unit name in Radio Trigger???
Lucky44 replied to Lucky44's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Both players died! Interesting. -
Checking unit name in Radio Trigger???
Lucky44 replied to Lucky44's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
OK, just an update: I've put the addAction on a backpack (I prefer the UAV Terminal one), just like this: this addAction ["Call artillery strike!","boomboom.sqf"] This works well in MP. It gives you an object that someone can pick up and take with them, then "drop" and use. We noted that others could NOT use it when it was being worn, so someone can't accidentally fire it from behind you. It has to be dropped for the newly added Action to be functional. We did have a little glitch once when our group (The Art of Warfare, TAW.net) ran the mission with it last night. When the big moment came to call the artillery strike, I let someone else do it, and after a few seconds, it didn't seem to be working, so I hurriedly activated it myself. But in previous MP tests, either of us could do it. Now, on to getPlayerUID. I'm having trouble with this. I was looking at the Armaholic post you linked, F2kSel, and I can't quite follow how ablueman is using it. WHEN is he calling it? HOW is he calling it? Is it possible to put it in a Radio Trigger? How would that need to be scripted? -
Checking unit name in Radio Trigger???
Lucky44 replied to Lucky44's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hmm, addAction. That should work fine. Slightly clunky on the controls, but at least it does the job. Thanks again! Just in case anyone else wants to know a way to do this, here's what I'm doing. I'm putting these "two" lines of code in the Init box of the unit I'm calling my Artillery Spotter: this addAction ["",""]; this addAction ["Call artillery strike!","boomboom.sqf"] The first action is a fake, a place holder. If you only used the second one, the action that really lets you call the boomboom.sqf script, the option to use the action is always sitting in the middle of the unit's screen. The first one, the place holder, helps avoid that problem. EDIT: small problem, for some situations...once you add the action to a unit, any player can walk up to the unit and activate the action! Back to the drawing board to figure a workaround! -
Checking unit name in Radio Trigger???
Lucky44 replied to Lucky44's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
AWESOME! That will do it, perfectly. I knew it couldn't be too hard, but for some reason, I was just missing that simple syntax. Thanks much! For others who might be interested, here's the info: ------------------------------------------------------------------ As you've already worked out you need to allow anyone to try and use the radio but limit it to the actual unit by using the On Act box. if (player == p36) then { hint "Roger That"}; If you want several player to use the radio then in a game logic place all the names into an array array1= [ p34,p35,p36] and in the On Act of the trigger if (player in array1) then { hint "Roger That"}; ---------- Post added at 05:19 PM ---------- Previous post was at 04:59 PM ---------- EXCEPT there's one problem: this doesn't seem to work in Multiplayer. Is there a way to make it work? -
Checking unit name in Radio Trigger???
Lucky44 replied to Lucky44's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
No one has any idea? I can't even tie ONE unit name to a radio trigger (i.e., limit the radio to one unit) at this point. :( -
GeneralCarver Vehicle Ammo Crate Script
Lucky44 replied to GeneralCarver's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thanks for sharing this GC. To alleviate the JIP issues, would adding this line near the start of the script(s) create problems, do you think: if (! isServer) exitwith {}; I haven't looked at the scripts in detail, but I don't see why it wouldn't work. It'd be nice to avoid those JIP issues. And be able to use this nicely made script on larger missions (where JIP is a possibility). -
Question about spawning vehicles in the air
Lucky44 posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I'm trying to make a script to spawn helos and planes in the air. I must be missing something. The helo will spawn on the ground and then take off, but I can't get it to start in the air. Also, I can't seem to get the helo to follow the altitude settings in the waypoints. And this wiki page didn't help much. Lastly, I'm betting there's something that has to be different for fixed-wing aircraft vs. helos, but I don't know what, exactly (maybe setVelocity) ? Here's the code for the helo. Can anyone straighten me out, please? airSquad1 = createGroup EAST; // set the soldiers' group's name to be created _Vunit = createVehicle ["Mi24_D_TK_EP1", (getMarkerPos "mrk_fly"), [], 20, "FLYING"]; // Spawn a pilot for aircraft and put him in it _unit= airsquad1 createUnit ["TK_Soldier_pilot_EP1", (getMarkerPos "mrk_fly"), [], 10, "form"]; _unit moveInDriver _Vunit; sleep 0.2; // Put the aircraft in the air // Set marker names to the generic "_point#" names. Must have the markers on the map already.///////////////////////////////////////////////////// _point0 = getMarkerPos "mrk_fly1a"; _wp0 = airsquad1 addWaypoint [ _point0, 10]; // set location (by marker already on map) and radius for 1st wp _wp0 setWaypointType "MOVE"; _wp0 setWaypointStatements ["true", "_Vunit flyinheight 10"]; // true is the condition for the WP; the part in quotes is a statement to process _wp0 setWaypointSpeed "NORMAL"; _point0 = getMarkerPos "mrk_fly1b"; _wp0 = airsquad1 addWaypoint [ _point0, 10]; // set location and radius for next wp _wp0 setWaypointType "MOVE"; // _wp0 setWaypointStatements ["true", ""]; // true is the condition for the WP; the part in quotes is a statement to process _wp0 setWaypointTimeout [20,25,30]; _wp0 setWaypointSpeed "NORMAL"; _point0 = getMarkerPos "mrk_fly1c"; _wp0 = airsquad1 addWaypoint [ _point0, 10]; // set location and radius for next wp _wp0 setWaypointType "MOVE"; // _wp0 setWaypointStatements ["true", "_Vunit flyinheight 200"]; // true is the condition for the WP; the part in quotes is a statement to process _wp0 setWaypointTimeout [20,25,30]; _wp0 setWaypointSpeed "NORMAL"; -
Question about spawning vehicles in the air
Lucky44 replied to Lucky44's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Demonized: thanks SO much. That is so helpful. Lots of little details there will help me make this work! EDIT: In case others are looking for ways to utilize this function, here are some other things I've learned. First, here's a simple script to spawn 1 Mi-24D: /* ////////////////////////////////////////////////////////////////// Testing the BIS_fnc_spawnVehicle function Created by: TAW Lucky Note: Wiki says it requires an exisiting group or creation of a new one, but it works w/o that, in my tests. Syntax: [position,direction,type,side or group] call BIS_fnc_spawnVehicle e.g., [logic1, 240, "Mi24_D_TK_EP1", EAST] call bis_fnc_spawnvehicle; --this example uses a GameLogic called "logic1" --the function requires a Function Module on the map, which links/syncs itself to the GameLogic To get the aircraft to spawn at 100m altitide, I'm using this line: _spot1 = [getpos logic1 select 0, getpos logic1 select 1, 100]; Note: the helo starts flying in the direction specified at moderate speed. */////////////////////////////////////////////////////////////////////////////////////////// airSquad1 = createGroup EAST; // create a group for the unit to spawn into. NOTE: works w/o this line though! _spot1 = [getpos logic1 select 0, getpos logic1 select 1, 100]; [_spot1, 0, "Mi24_D_TK_EP1", EAST] call bis_fnc_spawnvehicle; Also, there's a related function that will be helpful for a lot of people: fnc_spawnGroup. More on that here: http://community.bistudio.com/wiki/BIS_fnc_spawnGroup -
Question about spawning vehicles in the air
Lucky44 replied to Lucky44's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thanks, Celery, for clearing that up. Any ideas about the setWaypointStatements and flyinHeight? -
Simple syntax question: using "if" with "and"
Lucky44 posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I can't believe I can't find the answer to this...maybe it's not possible. I just want to have a multi-condition like this: if (_size >= 11) and (_size <= 50) then... And I can't seem to find the answer anywhere. How do you put two conditions in an If statement? Could I do: if (11<_size>=50) then... or something like that??? -
Simple syntax question: using "if" with "and"
Lucky44 replied to Lucky44's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thanks! It was making me crazy! I thought there should be a way to do that. -
Script issue with GetPos and string variable
Lucky44 replied to Lucky44's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Argh. I didn't think GetMarkerPos would work since I was just giving it a string name, but it seems to be working. Thanks! -
Script issue with GetPos and string variable
Lucky44 posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I'd be grateful for help with this...I'm just brain dead on how to fix this little issue. I'm trying to have 3 of 6 marker positions chosen randomly (that is, I have 6 markers on the map, I want to randomly pick 1 at a time, for a total of 3). After each one is picked, I want to spawn some units at that location. My problem is that I have an array of the marker names, and I pick one randomly, but then I can't use the marker name (which is a string) as a location for spawning. Here's my code: _camps = ["spawn1", "spawn2", "spawn3", "spawn4", "spawn5", "spawn6"]; //this is the array of spawn points for camps _picked = []; // this array will hold the camps that have been picked so they're not picked again. n1=0; // variables used for randomly choosing 6 camps n2=0; n3=0; n4=0; n5=0; n6=0; n1 = round ((random 6) + 0.5); _camp1 = getpos (_camps select n1); squad1 = createGroup EAST; for [{_i = 0}, {_i <= 3}, {_i = _i + 1}] do { _unit= squad1 createUnit ["TK_Soldier_EP1", [getpos _camp1 select 0, getpos _camp1 select 1,0], [], 0, "form"]; _unit2= squad1 createUnit ["TK_Soldier_LAT_EP1", [getpos _camp1 select 0, getpos _camp1 select 1,0], [], 0, "form"]; }; I am sure there's a way to do this, either by changing the array and using GetMarkerPos or ...something. Suggestions, please?