Announcement

Collapse
No announcement yet.

In Editor way of Randomizing Unit Presence

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • In Editor way of Randomizing Unit Presence

    Hey guys,

    I know there are a myriad of scripts out there for random unit generation. However, there is a simple in editor way that you can create conditional or random unit presence.

    Under the unit properties of an item, you can use the "presence slider" to adjust the chances of a unit being presence.

    In addition to this you can script in a condition in the "Condition" text box below it. By default its set to "true". But, lets use an example of how we can make an entire infantry squad randomly be present or not.

    ===example===
    OK. Lets name the commander "leader". Set his probability slider to like 50%.

    Now in the rest of his unit, add the code "alive leader" in the "condition" text box under their unit properties.

    Now preview the mission and you will see that when the leader is not there, the rest of his men are not their either.

    This is incrediablly easy to use and you can create small conditional situations and avoid setting up any complicated scripts which often give novice mission editors trouble.

    Have fun. I hope you can used that handy tip.
    Never tell people how to do things. Tell them what to do and they will surprise you with their ingenuity. - General George S. Patton.

  • #2
    Re: In Editor way of Randomizing Unit Presence

    good call Carver, I know I don't utilize this enough either - just thought I'd mention the code you need to put into their "condition of presence" field might actually be "alive (leader this)"

    Comment


    • #3
      Re: In Editor way of Randomizing Unit Presence

      As I just mentioned to GC, if the squad is "grouped" to the commander and he is 50% probability then I believe if game logic chooses not to put him on the map, the squad does not appear either.

      I could be wrong, but I am pretty sure that works.
      BlackDog1




      "What we do in life... echoes in eternity!"

      Comment


      • #4
        Re: In Editor way of Randomizing Unit Presence

        Actually, if only the leader is set as 50% presense. The rest of his squad will still be there. No matter if the leader is 'present' or not. Or grouped or not.
        The rest of the squad still has to be set manually or by typing what Homer said. If you want the whole grouped units to appear together or separately/individually.


        Leader = X
        Squad member = Y

        X = 50% (Appears 50/50 ratio) - Presense slider at 50%
        Y = 100% (Appears 100%) - Presense slider at 100%
        Y = 100% (Appears 100%) - Presense slider at 100%
        Result: X+Y+Y or Y+Y

        if you do what Homer said;

        X = 50% (Appears 50/50 Chance) - Presense slider at 50%
        Y = 100%/0% (Appears alive/not alive Leader) - Presense slider at 100%
        Y = 100%/0% (Appears alive/not alive Leader) - Presense slider at 100%
        Result: X+Y+Y or None

        If you do it manually;

        X = 50% (Appears 50/50 Chance) - Presense slider at 50%
        Y = 50% (Appears 50/50 Chance) - Presense slider at 50%
        Y = 50% (Appears 50/50 Chance) - Presense slider at 50%
        Result: X+Y+Y or Y+Y or X+Y

        TGU Instructor TG Pathfinder

        Former TGU Dean Former ARMA Admin Former Irregulars Officer

        "Do not seek death. Death will find you. But seek the road which makes death a fulfillment." - Dag Hammarskjold

        Comment


        • #5
          Re: In Editor way of Randomizing Unit Presence

          wth, this a calculus lesson or something? my heads spinning around.
          Never tell people how to do things. Tell them what to do and they will surprise you with their ingenuity. - General George S. Patton.

          Comment


          • #6
            Re: In Editor way of Randomizing Unit Presence

            always use skrips to create units like that.
            If not you can't count the groups. I hope everyone knows that you can't create more groups then 144. One single Person is one Group too. And after they die you have to delete the group manual!
            so:
            _locvar = random 3;
            if(_locvar < 1)then{ code to create units;exitwith{};};
            if(_locvar < 2)then{ code to create units;exitwith{};};
            if(_locvar < 3)then{ code to create units;exitwith{};};
            Feind erkannt - Gefahr gebannt!

            Comment


            • #7
              Re: In Editor way of Randomizing Unit Presence

              Originally posted by GeneralCarver View Post
              wth, this a calculus lesson or something? my heads spinning around.
              LOL Carver

              I find Lakis more confusing actually.

              TGU Instructor TG Pathfinder

              Former TGU Dean Former ARMA Admin Former Irregulars Officer

              "Do not seek death. Death will find you. But seek the road which makes death a fulfillment." - Dag Hammarskjold

              Comment


              • #8
                Re: In Editor way of Randomizing Unit Presence

                Hmm. I thought that BD1 and GC had it right with the leader determining the presence of the other units.

                Another cool thing you can do is place markers and group the unit with the markers. The unit will now randomly spawn at one of the markers (this gotten from Mr. Murray's guide).

                -BoD
                BarnacleofDoom

                One shot - One miss!

                Comment

                Connect

                Collapse

                TeamSpeak 3 Server

                Collapse

                Advertisement

                Collapse

                Twitter Feed

                Collapse

                Working...
                X