Jump to content

Lucky44

Member
  • Content Count

    359
  • Joined

  • Last visited

  • Medals

Everything posted by Lucky44

  1. Thanks, Tonic, for putting this together and continued work on it. Do think this bandwidth issue is only for the full version (#0)? Would it be incrementally less bad with smaller things, like the backpack only version (#3)? Would decreasing the number of each object in the crate help?
  2. Kommiekat: you can call the line in your #3 any way you like. For example, you can put it in your init.sqf. That's probably the easiest thing to do. You just need to have a clean way to execute the script (jsp_garrison_radius.sqf) with the parameters you want. Keep in mind that the first element of those parameters is "mrk2", right? And that means that the location where this radius will be centered is a marker named "mrk2". So you need a marker on the map with that name for it to work.
  3. I know how to use a finite set of markers to create a random spawn location (at one of the markers, chosen randomly), and I know how to use the "Placement Radius" boxes, but I don't know how to make an AI unit/vehicle spawn randomly within an area / trigger range. I saw something like this talked about, but nothing was clear. Is it possible? If so, what are the key pieces of syntax? Thanks in advance!
  4. Thanks, folks. Appreciated. I think the animation/move itself will disable the keyboard commands. I just haven't figured out why it didn't that one time I was testing it...probably just an anomalous bug.
  5. I've searched high and low and can't find anything on this. I'm trying to make sure that a player who's performing a certain Action (via an addAction that puts the player into a Move animation) can't walk away in the middle of the animation. I thought the player was locked out of control of movement like that, but apparently not. Is there a way to make sure the player must stay put through the duration of the animation/Move? EDIT: OK, more tests are needed. It seems to lock the player into the animation automatically now. I am going to have to figure out what happened on the other time I tested it and it let me move. I'll get back about this.
  6. I'm trying to name a vehicle that I'm creating with BIS_fnc_SpawnVehicle, and it's not working. Can anyone improve on this (non-working) approach? _TestHelo1 = [getMarkerPos "mrk_WP1", 20, "LIN_UH1", _airSquad1] call BIS_fnc_spawnvehicle;
  7. Sigh. -Thanks, twirly. That's awesome. I am such a hack programmer. But I keep learning by doing ;)
  8. I found a little more info, but it's even more confusing now! If I output the value of Helo98 (like Hint Format ["Helo98 is now %1",Helo98] ), it shows up as having a value of "to Helo98". -Yes, with the "to" in there! I've never seen anything like that! Now I'm really confused!
  9. Thanks, Cuel. But I'm still getting a (different) problem. Here's my code now: _testHelo1 = [getMarkerPos "mrk_WPtest0", 10, "LIN_UH1", _airSquad1] call bis_fnc_spawnvehicle; (_testHelo1 select 0) setVehicleVarName "Helo98"; . . . //move each group member into Helo for "_x" from 0 to 4 do { sleep 0.2; (units _heloTroop1 select _x) moveInCargo Helo98; }; The problem comes when I try to refer to helo98. I get a "undefined variable" error. Why would that be???
  10. Thanks, Buliwyf. I tried it like this: _testHelo1 = [getMarkerPos "mrk_WPtest0", 20, "LIN_UH1", _airSquad1] call bis_fnc_spawnvehicle; _testHelo1 setVehicleVarName "Helo98"; And got an error about "type array, expected object". -I don't see what is coming up as an array there.
  11. Lucky44

    TexView 2 woes...

    No, it's not an add-on, just a textured flag, with the texture file loaded into the mission pbo. I've done it with other flag textures and it has worked, but that was a couple years ago. :(
  12. Lucky44

    TexView 2 woes...

    Gah! I've taken my image from JPG to TGA to PAA. It shows up fine on a flag on my local client (the host), but when I connect another client, it gets an error ("Cannot load texture") and can't see the flag. Is that indicative of anything particular that I can do to fix it? Any suggestions on what might be wrong?
  13. Quick question: I don't see any provision for running for MultiPlayer, either on Dedicated or Hosted servers. I naively assumed that was built in, but when I played my mission with 11 players (on a dedicated server), I got a nasty surprise (it spawned one "set" of hostiles per player connected, overwhelming the server). Did I do something wrong? Is there a best way to adapt it to a dedicated server? Would a simple: if (!isServer) exitwith {}; do the trick? -Anyone?? EDIT: I've tried adding a line at the beginning that's just: if (!isServer) exitwith {}; --and it seems to do the trick. But I'd be curious for more expert folks to weigh in.
  14. Just wanted to say THANKS! this is a really nice work.
  15. I appreciate any help! I'm trying to randomize which 6 of 20 "intel objects" (e.g., files, photos, laptops) in a building need to be gathered by the players in this co-op mission. My method is to place each object on the map in the editor and give it a name. Then I'm running a script that picks a first object randomly and adds the "Take this intel for examination later" action to it. Then it continues on to pick 5 more objects (that haven't been picked yet.) I originally ran the script that does this from an execVM from the init.sqf. Problem was that it effectively ran once for each client connected, apparently. So I put a "if (!isServer) exitwith {}" at the top of the script. But that made it only run on the dedicated server, and not on any clients. I know there's a way to accomplish this, but I'm stuck trying to find it! Here's the code, if it helps. if (!isServer) exitWith {}; // This is an addition for version 0.4 sleep 9; _intel1 = [i0,i1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11,i12,i13,i14,i15,i16,i17,i18,i19]; //array of intel items //initialize the picked variables (with obviously weird values!) _r1=-2; _r2=-2; _r3=-2; _r4=-2; _r5=-2; _r6=-2; //randomly choose 6 intel pieces to activate from the 20 possible///////////////////////////////////////////////////// //1st object: /////////////////////////////////////////////////////////// _r1 = floor(random 20); // set value for first pick (_intel1 select _r1) addAction ["Take this intel for later examination","scripts\takeIntel.sqf"]; // 2nd roll: start _r2 ////////////////////////////////////////////////// _r2 = floor(random 20); while {_r2==_r1} do { _r2 = floor(random 20); // reroll }; (_intel1 select _r2) addAction ["Take this intel for later examination","scripts\takeIntel.sqf"]; // 3rd roll: start _r3 ///////////////////////////////////////////////// _r3 = floor(random 20); while {(_r3==_r1) or (_r3==_r2)} do { _r3 = floor(random 20); // reroll }; (_intel1 select _r3) addAction ["Take this intel for later examination","scripts\takeIntel.sqf"]; // 4th roll: start _r4 ///////////////////////////////////////////////// _r4 = floor(random 20); while {(_r4==_r1) or (_r4==_r2) or (_r4==_r3)} do { _r4 = floor(random 20); // reroll }; (_intel1 select _r4) addAction ["Take this intel for later examination","scripts\takeIntel.sqf"]; // 5th roll: start _r5 ///////////////////////////////////////////////// _r5 = floor(random 20); while {(_r5==_r1) or (_r5==_r2) or (_r5==_r3) or (_r5==_r4)} do { _r5 = floor(random 20); // reroll }; (_intel1 select _r5) addAction ["Take this intel for later examination","scripts\takeIntel.sqf"]; // 6th roll: start _r6 ///////////////////////////////////////////////// _r6 = floor(random 20); while {(_r6==_r1) or (_r6==_r2) or (_r6==_r3) or (_r6==_r4) or (_r6==_r5)} do { _r6 = floor(random 20); // reroll }; (_intel1 select _r6) addAction ["Take this intel for later examination","scripts\takeIntel.sqf"];
  16. OK, quick question: why add the actions both locally and globally? Why not just add them globally?
  17. Thanks very much to both of you for taking the time to help out. I'll try Cuel's approach first and see how that goes. I didn't know about BIS_fnc_selectRandom ! How great is that!! Thanks.
  18. I'm trying to spawn a varied number of groups and send them all along the same waypoints. The only problem I'm having is that only the first spawned group will follow the waypoints; the others just stand at the spawn area. I know it must be something about naming the groups and referring to those names, but I've tried a variety of things and nothing is working. What am I doing wrong? In the code, _hSquads is a number scaled to the number of players. for "_x" from 1 to _hSquads do { _squad1 = [_spawnPt, EAST, 8] call BIS_fnc_spawnGroup; _wp0 = _squad1 addWaypoint [ _WP1, 1]; // set location and radius _wp0 setWaypointType "MOVE"; // set WP type here _wp0 setWaypointStatements ["true", ""]; // ? _wp1 = _squad1 addWaypoint [_WP2, 3]; _wp1 setWaypointType "MOVE"; _wp1 setWaypointStatements ["true", ""]; _wp2 = _squad1 addWaypoint [_WP3, 3]; _wp2 setWaypointType "MOVE"; _wp2 setWaypointStatements ["true",""]; }: EDIT: Well, I realized the problem was I'd changed some waypoint names and painted myself into a corner. Problem solved by renaming the waypoints! Thanks in advance!
  19. Lucky44

    Mission Editor

    OK, so I hear that any game content won't carry over to Arma 3. Makes sense. But what about the scripting languages? What's the word on that? EDIT: Aha, this helps explain, but it's too long to read it all... http://forums.bistudio.com/showthread.php?128800-Take-On-Java/page1
  20. Lucky44

    Mission Editor

    I have not found this anywhere else after looking, so I'll ask here: what is known about importing Arma2:OA (or CO) missions into Arma 3? Will .sqm files work? Will A2 units be possible in A3, without addons? Will it be a possible but difficult "translation"? Or just impossible?? Will map elements be copy/pastable, even in a script editor, working with .sqm files? And more fundamentally, is it true that SQF will still be the base scripting language, but that others (Java friendly? like Python??) will be usable?
  21. Wow, thanks! Great little summary. I really appreciate it.
  22. I've searched around with no luck, and this is driving me nuts. I'm looking at the isNull wiki entry, and it gives this example: if (isNull obj) then {hint "doesn't exist"} So I try this, but it says that p10 is an undefined variable: if (isNull p10) then {hint "p10 is null"}; p10 is a playable unit. If someone is in that slot, everything is fine. If not, I get the "undefined variable" error. What's going on there? (What I'm ultimately trying to do is a check for !isNull, so that something certain gear is giving to the p10 unit if there's a player in the slot, BTW.)
  23. Sigh. Thanks for the help. I guess I still am not clear on the difference between isNil and isNull. I see http://community.bistudio.com/wiki/isNil and http://community.bistudio.com/wiki/isNull, but it's not sinking in. I should have thought to at least try it, though! (Readers: note the use of quotation marks with isNil) ---------- Post added at 06:29 PM ---------- Previous post was at 06:17 PM ---------- Ugh, it couldn't be simple, could it? I'm having problems with both !isNil and !isNull - both are giving me "undefined variable" errors. Here's the whole code; the !isNil is 2/3 down. { removeAllWeapons _x;//clear em out first //Add standard items to all _x addWeapon "Binocular_Vector"; _x addWeapon "NVGoggles"; _x addMagazine "SmokeShell"; _x addMagazine "SmokeShell"; _x addMagazine "IR_Strobe_Target"; _x addMagazine "handgrenade_west"; for "_i" from 1 to 8 do {_x addMagazine "15Rnd_9x19_M9SD"}; _x addWeapon "M9SD"; //give each team member specified rifle for "_n" from 1 to 8 do {_x addMagazine "30Rnd_556x45_StanagSD"}; _x addWeapon "m8_tws_sd"; //clear backpacks and insert specified gear into them clearMagazineCargo unitBackpack _x; //_x addBackpack "US_Assault_Pack_EP1"; // this is how you'd add one, if needed. (unitBackpack _x) addMagazineCargo ["30Rnd_556x45_StanagSD",4]; (unitBackpack _x) addMagazineCargo ["SmokeShell",2]; (unitBackpack _x) addMagazineCargo ["handgrenade_west",2]; //if someone is in the sniper/observer slot, give specific gear if ((!isNil "p10") && (_x == p10)) then { p10 removeWeapon "m8_TWS_SD"; p10 removeMagazines "30Rnd_556x45_StanagSD"; for "_y" from 1 to 8 do {p10 addMagazine "20rnd_762x51_b_scar"}; p10 addWeapon "M110_TWS_EP1"; clearMagazineCargo unitBackpack _x; (unitBackpack _x) addMagazineCargo ["20rnd_762x51_b_scar",4]; (unitBackpack _x) addMagazineCargo ["SmokeShell",2]; (unitBackpack _x) addMagazineCargo ["handgrenade_west",2]; }; } forEach playableUnits; Is it a problem that it's all inside a "playableUnits" forEach? Thanks again for any help.
  24. That sounds smart, Sel, thanks. I intend this to be a stealth mission (briefing: HERE), but if the players get sloppy, it'll get busy. So I think I should actually run a loop for all opFor and remove all EH after the alarms have been sounded. There could be a lot of shooting!
  25. I'm trying to create a script that works with an EventHandler. The goal is to simulate AI guards calling for help (by radio, presumably) if they spot players and have time to make the radio call before being killed. (If you know a better way to do this, please say so!) What I'm doing is this: I have a "fired" eventHandler on each AI guard. So if they fire their weapon, it runs the script below: if (!isServer) exitwith {}; // make sure only the server runs the script if (alarmSounded == "true") exitwith {}; // just quit script if alarm has already sounded if (shotFlag == "true") exitwith {}; // this is initialized in the init.sqf shotFlag = "true"; //the problem with this ATM is that if one person shoots, the script won't work again for 10-15 seconds, for ANYONE... publicVariable "shotFlag"; sleep (random 5)+10; // if unit is still alive 10-15 seconds after shooting, it will call on radio for help _shooter = _this select 0; if (alive _shooter) then { [[west,"HQ"],nil,rsideChat, "You've been spotted. A hostile guard put out a radio call for help!"] call RE; //hint format ["%1 is calling for help on the radio!",_shooter]; // another approach alarmSounded = "true"; // this will disable further messages and calls for reinforcements publicVariable "alarmSounded"; sleep 260+(random 120); // put a delay before the reinforcements start out execVM "scripts\spawnRFland.sqf"; //spawn some reinforcements on land execVM "scripts\spawnRFair.sqf"; //spawn some reinforcements in air } else { shotFlag = "FALSE"; //reset the variable }; The problem I foresee is if one guard shoots, no other guards will be able to shoot and radio for help until the 10-15 seconds is up for the first guard. I think I should create a variable tied to each AI unit that is like the shotFlag above. But I can't remember what that kind of variable is called to even look it up! Any suggestions will be very welcome!
×