Jump to content

Abrahamsen

Member
  • Content Count

    15
  • Joined

  • Last visited

  • Medals

Community Reputation

10 Good

About Abrahamsen

  • Rank
    Private First Class
  1. Imagine a race system that registers and writes the times that players cross the finish line (the trigger) I haven't looked into diag_log, but I want the score to be shown to the players. From what I read about diag_log, that is more of a command for saving files? And yes, it is to run on a dedicated server.
  2. Thought I would bump this, as I still need help.
  3. Hi, I'm looking for someone to explain to me a way to script a simple system that tracks and hints the times after the mission start that b1,b2,b3,b4...b27 made it to a trigger. The hint should look something like: Times: player name: time player name: time player name: time player name: time The player names should only appear when the player gets to the trigger. I'm not very comfortable just throwing myself into scripting my own new concepts, so I need some help. I realize it's about registering the caller of a trigger, add him to an array and opdate the hint, while also ensuring that players are not being re-added for exiting the trigger and entering it again. Thanks in advance!
  4. Now how about a script that checks if obj_zar1, obj_zar2 and obj_zar3 dies and if obj_zar1 dies, it sets east sides 1st task as SUCCEEDED and west side as FAILED? (same goes for obj_zar2 and obj_zar3 to tskObj2 and tskObj3). And if they all die or are rescued the mission ends (with a different END# for each outcome) How do I setup that? :D
  5. yep, that was it. I thought about it, but I didn't think it would stop the whole script from working if it could not find the task.
  6. I have never had it explained like that before, that's pure gold! I really get most that now. THANK YOU SHK. I'll read that through a couple of times now :) edit: Hmm. Still can't get it to work. It's not updating the task. ---------- Post added at 03:24 PM ---------- Previous post was at 02:47 PM ---------- I could get this to work: though, what am I missing? ---------- Post added at 03:28 PM ---------- Previous post was at 03:24 PM ---------- I got this in a trigger now: If you have the guy with you in the helicopter, it's a success, if you don't it's failed. It works. I can't figur out why I can't get your much cleaner script to work. ---------- Post added at 03:32 PM ---------- Previous post was at 03:28 PM ---------- another thing: It should be the opposite for east side. If west completes a task, east should fail it and vica versa. ---------- Post added at 03:41 PM ---------- Previous post was at 03:32 PM ---------- I'm just gonna ham-hand something together that works, then ask for expert help on trimming it down to something clean :)
  7. Thank you, I will try that out! I don't have any prior programming skills so I have to teach myself every aspect of coding. Would you mind explaining what exactly happens and for what reason in each step of the code? I know how it works by stuff like why you call compile format something and how %x is used (tsk%1) and how _x works. Also, if you have the time to explain the execVM command (Script = argument execVM filename). It's hard building your own working scripts when these basic concepts aren't sticking. Thank you for the solution to the problem, as said, I'll go try it now :) ---------- Post added at 01:47 PM ---------- Previous post was at 01:45 PM ---------- and actually my tasks are named tskObj0, tskObj1, tskObj2 and soforth. the units are called obj_zar1, obj_zar2, obj_zar3.
  8. But wouldn't that count ALL passengers in the helicopter? I need it to only count specific units. ---------- Post added at 01:04 PM ---------- Previous post was at 01:02 PM ---------- And I need it to tell which unit is in and which is not. When the pilot trigger the trigger I want to know if unit A is in, if B is in and if C is in. A, B and C each have a task. If A is in then task tskA is triggered. if A and C is in then tskA and tskC is triggered.
  9. I have a question. (Multiplayer, it has to work, localitywise) I want a setup to trigger one of 4 different outcomes. If one of the units is a passenger in the helicopter, trigger someting If two of the units are passengers in the helicopter, trigger something else if three of the units are passengers in the helicopter, trigger something else if none of the units are passengers, hint something. The units are civilians that you have to extract. If you get all of them you should get one ending and the task about saving that unit should be set to SUCCESS. How do I go and do that?
  10. Slothophile, I'm very new to scripting, I thought about this yesterday but forgot it after a few hours of sleep. I'll just do this I think Thank you all for the hints, it's so helpful when I get an explanation along with the proposed code. ---------- Post added at 01:40 PM ---------- Previous post was at 01:37 PM ---------- I like your answer because it incorporates eventhandlers that I was using to begin with, but I know see that I should just use a trigger. ---------- Post added at 01:42 PM ---------- Previous post was at 01:40 PM ---------- Actually I had already used a trigger to unlock the osprey by having in the cond. field: I just didn't realize my eventhandler solution didn't work. ---------- Post added at 01:45 PM ---------- Previous post was at 01:42 PM ---------- And there isn't a space between "sq" and "f" in my script, don't know why it showed up here.
  11. This isn't working in multiplayer (but in the editor): and this isn't either: The tasks are not updating when the officer1 dies. It does when I try it in the editor though. Same with the osprey. How come? I''m new to this forum, and new to arma 2 scripting.
  12. Oh, right yeah, I'm mixing it up. All I wanted to be cleared on was passing that array through. edit: sorry, I'm a noob
  13. I just skimmed your posts and I just want to express how wonderful it feels actually getting some help. I have been hopelessly stuck on every attempt at anything more advanced than just using waypoints and triggers. (I know they won't become obsolete, but I think you get what I'm saying) Just getting some feedback on my simple coding is a giant help. I think I will pile together some different questions in a big thread. Thank you guys, you sure did Ninja :D:yay: edit: Now I'll make my map work (at least that part ;)) edit2: Results: The only solution I could get working was the first posted one, but I know what the trouble is. I'm still not very used to how you pass values through scripts being called by those that call them. Like, I execute a "weapons.sqf" from the init.sqf file, just like execVM "weapons.sqf";. But how do I syntax it (if that's a verb) so that the other examples willl work? (the ones that make use of _x) Sorry, english isn't my first language. I hope I'm making my self clear. ---------- Post added at 12:03 AM ---------- Previous post was Yesterday at 11:31 PM ---------- Oh and: I put my self in control of one of the officers and when I ran the script to give him the other gun, he got it put equipped his pistol, the makarov. This doesn't happen if he is moving while he gets the gun though.
  14. I'm at a very basic level of scripting, I hope someone can help me trim down this little one and by doing so teach me some syntax and tricks. officer1 removeWeapon "AKS_74_U"; officer1 addWeapon "AK_107_kobra"; officer1 addMagazine ["30Rnd_545x39_AK",10]; officer2 removeWeapon "AKS_74_U"; officer2 addWeapon "AK_107_kobra"; officer2 addMagazine ["30Rnd_545x39_AK",10]; officer3 removeWeapon "AKS_74_U"; officer3 addWeapon "AK_107_kobra"; officer3 addMagazine ["30Rnd_545x39_AK",10]; officer4 removeWeapon "AKS_74_U"; officer4 addWeapon "AK_107_kobra"; officer4 addMagazine ["30Rnd_545x39_AK",10]; It's very basic stuff. oh, and hi, I'm new! edit: hmm, now it's not even working. Only the first guy gets the weapon.
×