Jump to content

Lucky44

Member
  • Content Count

    359
  • Joined

  • Last visited

  • Medals

Everything posted by Lucky44

  1. Thanks, Gunter. I have been looking at that first link; the stuff about Locality is important, but it's not very clear/thorough to me. I would have thought there'd be more info out there. But maybe the dedicated server folks are hording their secrets! It would really be great --and help promote the game-- if BIS could put something together that explained what should and should not be done when making missions for dedicated servers.
  2. Awesome! Thanks so much. My mistake was definitely that I didn't realize you had to have one part on your back and point at the other part to get the Assemble option. Thanks!
  3. I can put a 252 mortar on the map, then go in game and use it and/or disassemble it into a tripod bag and a mortar bag, but I can't reassemble the tripod and mortar! I'm confused. Am I doing something wrong? Does it work? It seems like you should be getting two bags that require two people to carry, and you should be able to drop them and get an action to reassemble them. The only action options I see are to pick them up. Help???
  4. Lucky44

    SetName?

    How to change the unit's "title" in the start-of-game lobby where you choose your role/class/unit: When placing a unit in the editor, just fill in the "Description" field with any info you want to show up. Took me way too long to find this out!
  5. That's great. Thanks very much for adding that info!
  6. This script does the job, but I know that there must be a better (i.e., more elegant/efficient) way. The purpose is to keep track of Civilian deaths. I was going to do it with a simple trigger, but I found that not only were human Civilians counted, it was also counting the herd of goats in the area! So that didn't work. So here are two questions: I bet there's a way using "isKindOf" or something to narrow the detection. But I had a hard time getting the right info about class names for the Oper. Arrowhead Takistani women. There are three kinds, and they don't all seem to be the same type. If I could get that straight, that'd be good. The second question, though, is how to use ForEach and an array instead of my While loop with 25 If statements. Thanks in advance for any suggestions! ////////////////////////////////////////////////////////////////// // Civ Deaths script: keeps count of (specific) Civilians killed // Created by: Lucky44 // Must be customized to the names of the enemy units tracked ////////////////////////////////////////////////////////////////// CivDeaths=0; // initialize the count Mtime=0; // initialize the Mission Time (in seconds); used to track total time for mission. c1flag = "nul"; // initialize these variables, 1 for each Civ... c2flag = "nul"; c3flag = "nul"; c4flag = "nul"; c5flag = "nul"; c6flag = "nul"; c7flag = "nul"; c8flag = "nul"; c9flag = "nul"; c10flag = "nul"; c11flag = "nul"; c12flag = "nul"; c13flag = "nul"; c14flag = "nul"; c15flag = "nul"; c16flag = "nul"; c17flag = "nul"; c18flag = "nul"; c19flag = "nul"; c20flag = "nul"; c21flag = "nul"; c22flag = "nul"; c23flag = "nul"; c24flag = "nul"; c25flag = "nul"; // WHILE LOOP to check for kills /////////////////////////////////////////////////////// // this number (3) could be changed to suit desire/situation while {CivDeaths<3} do { if (!alive w1 AND c1flag=="nul") then { c1flag = "dead"; CivDeaths = CivDeaths+1; }; if (!alive w2 AND c2flag=="nul") then { c2flag = "dead"; CivDeaths = CivDeaths+1; }; if (!alive w3 AND c3flag=="nul") then { c3flag = "dead"; CivDeaths = CivDeaths+1; }; if (!alive w4 AND c4flag=="nul") then { c4flag = "dead"; CivDeaths = CivDeaths+1; }; if (!alive w5 AND c5flag=="nul") then { c5flag = "dead"; CivDeaths = CivDeaths+1; }; if (!alive w6 AND c6flag=="nul") then { c6flag = "dead"; CivDeaths = CivDeaths+1; }; if (!alive w7 AND c7flag=="nul") then { c7flag = "dead"; CivDeaths = CivDeaths+1; }; if (!alive w8 AND c8flag=="nul") then { c8flag = "dead"; CivDeaths = CivDeaths+1; }; if (!alive w9 AND c9flag=="nul") then { c9flag = "dead"; CivDeaths = CivDeaths+1; }; if (!alive w10 AND c10flag=="nul") then { c10flag = "dead"; CivDeaths = CivDeaths+1; }; if (!alive w11 AND c11flag=="nul") then { c11flag = "dead"; CivDeaths = CivDeaths+1; }; if (!alive w12 AND c12flag=="nul") then { c12flag = "dead"; CivDeaths = CivDeaths+1; }; if (!alive w13 AND c13flag=="nul") then { c14flag = "dead"; CivDeaths = CivDeaths+1; }; if (!alive w14 AND c14flag=="nul") then { c14flag = "dead"; CivDeaths = CivDeaths+1; }; if (!alive w15 AND c15flag=="nul") then { c15flag = "dead"; CivDeaths = CivDeaths+1; }; if (!alive w16 AND c16flag=="nul") then { c16flag = "dead"; CivDeaths = CivDeaths+1; }; if (!alive w17 AND c17flag=="nul") then { c17flag = "dead"; CivDeaths = CivDeaths+1; }; if (!alive w18 AND c18flag=="nul") then { c18flag = "dead"; CivDeaths = CivDeaths+1; }; if (!alive w19 AND c19flag=="nul") then { c19flag = "dead"; CivDeaths = CivDeaths+1; }; if (!alive w20 AND c20flag=="nul") then { c20flag = "dead"; CivDeaths = CivDeaths+1; }; if (!alive w21 AND c21flag=="nul") then { c21flag = "dead"; CivDeaths = CivDeaths+1; }; if (!alive w22 AND c22flag=="nul") then { c22flag = "dead"; CivDeaths = CivDeaths+1; }; if (!alive w23 AND c23flag=="nul") then { c23flag = "dead"; CivDeaths = CivDeaths+1; }; if (!alive w24 AND c24flag=="nul") then { c24flag = "dead"; CivDeaths = CivDeaths+1; }; if (!alive w25 AND c25flag=="nul") then { c25flag = "dead"; CivDeaths = CivDeaths+1; }; Mtime = Mtime+1; sleep 1; // this makes the check fire just once per second to avoid CPU overloading }; // Assuming 3 or more Civs killed... sleep 2; TitleText ["Three civilians are dead... \n Bad News", "PLAIN"]; sleep 2; Mtime = Mtime/60; hint format["Number of minutes passed in mission was %1",Mtime]; // optional
  7. Thanks for that, HeliJunkie. I understand that much (and I understand why the loop only need to be called once). OK, I think the script is working fine as planned. But now I'm greedy! How can I get it to report each time a civilian is killed? I tried adding another variable (CivKilled) that's one greater than the civiliansDead variable to start, and if the civiliansDead is >= to it, the trigger fires. Works fine the first time a Civ dies, but not after that, even though I have it set on repeatedly. So I added a line in the OnEvent (at the end) that decrements the CivKilled so it's lower than the civiliansDead variable again, but no luck. Back to the drawing board!
  8. Thanks for the reply, Muzzleflash. I tried to implement your code, but I'm not clear on something: it looks like that code is only called once and doesn't continue to loop. Maybe I'm using it wrong. How would you have that code called? Under what circumstances? I'm completely unfamiliar with terms like "compile" and "call", and I have only a tiny amount of experience with addEventHandler, so my apologies.
  9. I've come at this a bunch of different ways, and I think I must be missing something. It seems like there must be an easy way to do get the name of the object/unit entering a trigger area. I know I can check via "thislist" to see if a particular unit is in a list, but is there a way to do something like: "enterer = GetEnteringObject" or "enterer = GetEnteringUnit" And it'd be especially useful if it could be done in the Condition box of the trigger, rather than having to use an external script. I'd like to use this in a number of places, getting the ID of the entering object for various uses. But right now I'd like to have a simple, repeatable way to create a mine that would only be set off if a "car" class vehicle entered it. So I'd want to check the entering vehicle's class. And since I want to have a dozen or so of these mines around, I don't want to have a separate script for each. Is there an easy way to do this? Thanks in advance.
  10. Thanks very much! This seems to do the job as is. How would you run a loop? Do you mean call a script that does it? I'm not sure how you would use "listTriggerName" in that.
  11. That shortens the script, yes. But it doesn't address the issue. ---------- Post added at 06:02 AM ---------- Previous post was at 06:02 AM ---------- This is a nice script for the previous question. Thanks.
  12. So I'm continuing to use this approach to ID units entering triggers. And I have a question. I'm trying to create a "radar" sort of script/effect that detects helos and planes entering the trigger area. I have trigger detecting BlueFor. In its onActivation box, I have nul = [(thislist select 0)] execVM "radar1.sqf"; in the script, radar1.sqf, I have this: blue1 = _this select 0; if (blue1 iskindof "Helicopter") then { hint "Radar detects helicopter!"; //this is for debugging only !!!!!!!!!!!!!!!!!! radarAlert = "true"; // this variable is what throws the trigger to scramble jets }; if (blue1 iskindof "Plane") then { hint "Radar detects plane!"; //this is for debugging only !!!!!!!!!!!!!!!!!!!!! radarAlert = "true"; // this variable is what throws the trigger to scramble jets }; If the aircraft is the first vehicle into the trigger area, it works great. If another unit, like an infantry unit, enters the trigger first (and stays there), the script won't detect the aircraft entering second. I have a hunch it has something to do with the array and that "select 0" is only taking the first object to enter the area, not resetting for each entering object. And I'm guessing that a FOR loop might be the way to do this right. But beyond that, I'm stumped :) Any suggestions will be appreciated. Thanks.
  13. Awesome. Thanks so much. It works perfectly.
  14. Stumped... I'm trying to have a trigger as a service point at a Helipad to automatically repair/refuel/rearm the helo after it sits on the pad for 10 seconds. I've tried both variants below, but neither work: aircraft1 = thislist select 0; aircraft1 setfuel 1; aircraft1 setdamage 0; aircraft1 setVehicleAmmo 1; (thislist select 0) setfuel 1; (thislist select 0) setdammage 0; (thislist select 0) setVehicleAmmo 1; Maybe I am doing multiple things wrong. But I'm still struggling with the "thislist select 0", or it feels that way, I guess. Any suggestions, please?
  15. I'm trying to run a little script, and it's working OK with a single player (on an MP server), but with multiple players, it is acting odd. The purpose of the script is, if the players' Huey is damaged over 85%, the script will delete the old helo, create a new one at the players' base, and move the players to the base too. Here's the code: cutText ["Your Huey was destroyed...","BLACK FADED",2]; sleep 2; deleteVehicle helo1; sleep 18; if(isServer) then { helo1 = "UH1Y" createVehicle (getmarkerpos "helo_spawn"); helo1 addAction ["Repair the helo!","repair_helo.sqf"]; joe1 setpos (getmarkerpos "marker_barn"); joe2 setpos (getmarkerpos "joe2_marker"); joe3 setpos (getmarkerpos "joe3_marker"); joe4 setpos (getmarkerpos "joe4_marker"); sleep 0.1; cutText ["Returning you to base...","BLACK IN",5]; }; What happens is that it seems to work right (but I'm not sure the newly spawned helo gets named "helo1" as it should), and then it does the fade from black a 2nd time and there are two helos spawned, not one. I'll be grateful for any help with this. ================================================================= OK, I don't know for sure what is going on, but it SEEMS like the 1.07 update changed something relevant, and now it seems to be working right, with a couple tests done. Still curious why it wouldn't work previously and whether there was actually something in the update that changed this.
  16. Thanks for that, Neo. I didn't catch that previously.
  17. I've got some vehicles set up with tripod-mounted MGs on the roof, and gunners (AI or player) can get in and use them. But I still can't figure out how to make them (or any weapon) fixed and fireable by the driver. Anyone? Anyone? Buehler???
  18. Frankly, I'll be a little surprised if anyone puts much into this idea. It's making the game more like a role-playing game than a battlefield sim. Not that people don't do some wild things with this wonderfully mod-able software. I just think people don't usually play Arma2 to go to a fridge and get food. That's not the part of war that people are eager to sim.
  19. Awesome. Thanks to both of you for helping me understand that better.
  20. That's great! So the array, thislist, is created by the trigger activation, yes? And the first object in it is the entering vehicle/object/unit?
  21. I've searched all over and can't find anything close to this. (That probably means I'm going about it all wrong!) All I want to do is find the nearest PLAYER to an object. I've got an Action on the object, and when a player "uses" the object/action, I want to play (force) an animation on the player. I know how to do the animation, but I am having trouble finding the player unit name. What am I missing? Thanks in advance.
  22. Thanks F2k_Sel and Myke for taking the time to help with that. I get it now. I'm still just learning coding, and I love it! I just wish I knew more. -Practice practice practice!
  23. OK, would those two lines go in the script called by the action? I'm just not clear on what "_this" will refer to here. ---------- Post added at 04:31 PM ---------- Previous post was at 04:25 PM ---------- That looks like an interesting approach to check to see if the "man" involved is a player. I can use that some places. Thanks.
  24. OK, thanks. I am making this for just 4 (possible) players, so I could give them names and do 4 "if" statements. On the other hand, maybe I'm worried unnecessarily. What I'm doing is "breaking down" a static MG to load it for transport. Maybe the closest unit to the MG is the one who should be doing the work anyway! (But I would like to know the easiest/safest way to find the closest PLAYER to an object anyway!)
×