Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Question about setCaptive when unit armed/unarmed

  1. #1
    Master Gunnery Sergeant Kirby's Avatar
    Join Date
    Aug 26 2006
    Location
    Bristol, England
    Posts
    1,002
    Before I get aload of sarcastic remarks and annoyed mods locking this down, Search didn't come up with anything (Latley it seems fudged anyway, Only returning searches from ArmA sections of the forum)

    I want to make it so that when a unit that is designated as captive picks up a guns he is setCaptive=False


    Also a few more questions may be asked here as I go on creating this mission.




  2. #2
    Well,I suppose that depends on the unit's side.
    If he's east or west,you could use a trigger at
    the right time to setcaptive=false.
    If he's civilian though,I think that's a bit more
    awkward,and might require editing the mission.sqm.

    Or use a third party addon that looks like a civilian,but configured
    as a "soldier".If ye see what I mean.

    Is that of any use?

    Or am i talkin rubbish?

    Macser





  3. #3
    Say your captive is named 'captive1'.

    Make a trigger, in the condition field type:
    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">&#40;&#40;count &#40;weapons captive1&#41;&#41; &#62; 0&#41; AND &#40;&#40;count &#40;magazines captive1&#41;&#41; &#62; 0&#41;[/QUOTE]

    In the OnActivation:
    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">captive1 setcaptive false[/QUOTE]

  4. #4
    Master Gunnery Sergeant Kirby's Avatar
    Join Date
    Aug 26 2006
    Location
    Bristol, England
    Posts
    1,002
    Author of the Thread
    @W0lle

    Thanks man.

    I&#39;ll try it ASAP.

    @Macser

    I know how to edit the SQM to make units on a different side, thats what I&#39;ve done, basicly I just want to make sure that no one (This is a MP mission) can grab a gun while still in the prison area and shoot without getting shot at during the rescue/escape. This will also be usfull in a few of my other missions (IE. Im half way through making one where your "dressed as" a civilian scouting enemy controled city, and we dont want people picking up a gun and shooting without resistance now do we? )




  5. #5

    Thumbs up

    Well since W0lle&#39;s on the case,disregard what I said,
    and good luck with what sounds like a very interestin&#39;
    Idea.

    *Edit

    "HasWeapon" might be another possibility.

    As in:
    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
    ?&#40;Captive1 hasWeapon &#34;Weapon&#34;&#41;&#58;Captive1 Setcaptive False
    [/QUOTE]

    Although W0lle&#39;s idea might be more flexible.

    Macser




  6. #6
    Master Gunnery Sergeant Kirby's Avatar
    Join Date
    Aug 26 2006
    Location
    Bristol, England
    Posts
    1,002
    Author of the Thread
    I also need to know how to set a specific unit as non-captive (setCaptive false) when outside of a specific area, I tried putting a trigger around the area saying something like a notpresent, notpresent a, "a" notpresent, a (not present) ect. ect. but I don&#39;t get that bit. I&#39;m searching for it right now on the internet but thought ***I might get a quicker response here.

    Also how would I make that ((count (weapons captive1)) > 0) AND ((count (magazines captive1)) > 0) thing as a script insted of a trigger, as I have 6 captive units.

    I haven&#39;t tested yet, but would:

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">&#40;&#40;count &#40;weapons a&#41;&#41; &#60; 1&#41; AND &#40;&#40;count &#40;magazines a&#41;&#41; &#60; 1&#41; else a setCaptive false
    &#40;&#40;count &#40;weapons b&#41;&#41; &#60; 1&#41; AND &#40;&#40;count &#40;magazines b&#41;&#41; &#60; 1&#41; else b setCaptive false[/QUOTE]
    ect.

    work?




  7. #7
    W0lle would be the man to ask about the scripting
    question.But as for the trigger,you could try grouping
    the unit/units to the relevant trigger.

    Then you&#39;ll have a new set of options.Where before grouping,
    your choices for activation would be "east","west" etc.Now
    you&#39;ll have "vehicle","whole group","group leader","any group member".Then set "present","not present" as you wish.




  8. #8
    Master Gunnery Sergeant Kirby's Avatar
    Join Date
    Aug 26 2006
    Location
    Bristol, England
    Posts
    1,002
    Author of the Thread
    Basicly if A goes out I dont want B, C, D, E and F, to get shot up

  9. #9
    Would the trigger only be activated once all the group
    is outside the trigger?
    if so,set the it to "whole group".then they&#39;ll all have to be
    outside for it to kick in.give it a go.

    That&#39;s assuming you actually want a group.rather than a
    collection of individuals.




  10. #10
    I actually don&#39;t see the need for a script.

    Name your captives from &#39;captive1&#39; to &#39;captive6&#39; and make a trigger as said above for each of them.

    In this case, if &#39;captive1&#39; picks up a weapon, captives2 to 6 are still captive - unless one of them also picks up a weapon.

    Or have I misunderstood something completely now?

    As for a group leaving the area, this shouldn&#39;t be too hard to do. All you need is a trigger and check if the unit is still present in it.
    But before I post here something that&#39;s not true I need to check it on my own first.

    I get back to you once I found a solution (if not someone is faster then me that is).




Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •