Help with condition functions

Squishinator

New Member
Reaction score
3
Trigger:
  • No Builder RED
    • Events
      • Unit - A unit enters RED dont allow <gen>
    • Conditions
      • (Unit-type of (Entering unit)) Equal to Builder
    • Actions
      • Player Group - Pick every player in (All allies of (Owner of (Entering unit))) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Owner of (Entering unit)) Not equal to (Owner of Throne 0008 <gen>)
                  • (Owner of (Entering unit)) Not equal to (Picked player)
            • Then - Actions
              • Special Effect - Create a special effect at (Position of (Entering unit)) using Abilities\Spells\Items\SpellShieldAmulet\SpellShieldCaster.mdl
              • Unit - Move (Entering unit) instantly to (Center of Red <gen>)
            • Else - Actions
              • Do nothing



I want the condition to work like this: if the entering unit will not be affected it it is the owner of the entering unit OR it is an ally of the entering unit. I thought i figured it out, and my ADD isnt making it easy for me to find the solution. (nice excuse, huh?:D)
 

Dois

New Member
Reaction score
1
Sorry... Don't quite understand your question...

Edit: The condition loop is kinda making it impossible for you to ever reach "Then - Actions"

I still don't understand what you want though. Could you rephrase?
 

Squishinator

New Member
Reaction score
3
I want it to work like this: your unit can enter this region, and an ally of yours can enter region y, but an enemy will be moved to region x.
 

bOb666777

Stand against the ugly world domination face!
Reaction score
117
Well, regions cant be owned by players so youd have to make 2+ (depending on number of teams) triggers
one with the event that a unit enters team 1's region, and one for team 2

Heres an example:
Code:
Trigger1
    Events
        Unit - A unit enters Team 1 region <gen>
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Owner of (Entering unit)) is an ally of Player 1 (Red)) Equal to False
            Then - Actions
                Unit - Move (Entering unit) instantly to (Center of Move Region <gen>)
            Else - Actions

Code:
Trigger2
    Events
        Unit - A unit enters Team 2 region <gen>
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Owner of (Entering unit)) is an ally of Player 7 (Green)) Equal to False
            Then - Actions
                Unit - Move (Entering unit) instantly to (Center of Move Region <gen>)
            Else - Actions

In trigger 1, if the entering unit is in team 1 (considering red is in team 1), it will allow it in, else it will move it to Move Region. In trigger 2, if the unit is in team 2 (considering green is in team 2), it will let it in, else it will move it to Move Region. If that's not what you meant, tell me.
 

Squishinator

New Member
Reaction score
3
Ooooooooooooooohh, that makes sense.

But could you explain to me why my way didnt work? explain it to me as if i were 6 years old.... (i'm kinda slow:confused:)
 

Squishinator

New Member
Reaction score
3
Wouldnt it be simpler to do this?:

Trigger:
  • No Builder RED
    • Events
      • Unit - A unit enters RED dont allow &lt;gen&gt;
    • Conditions
      • (Unit-type of (Entering unit)) Equal to Builder
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Entering unit)) is an enemy of Player 1 (Red)) Equal to False
        • Then - Actions
          • Do nothing
        • Else - Actions
          • Special Effect - Create a special effect at (Position of (Entering unit)) using Abilities\Spells\Items\SpellShieldAmulet\SpellShieldCaster.mdl
          • Unit - Move (Entering unit) instantly to (Center of Red &lt;gen&gt;)
 

Dois

New Member
Reaction score
1
It would be easier to do this...

Code:
Events
        Unit - A unit enters RED dont allow <gen>
    Conditions
        Unit-Type of Entering Unit equal to Builder
        Owner of Entering unit is an enemy of Player 1 Red equal to true
    Actions
        Create special effects...
        Move unit...

You can have multiple events and conditions.

Remember - any event, all conditions.

Any event will fire the trigger, for the actions to be taken, all conditions must be fulfilled.
 

Squishinator

New Member
Reaction score
3
This was all very helpful, but i just realized something:
I want it to work out so that once, say player 1, gains control over throne 3, which is originaly teals, then it will allow player 1's builder to enter the region.


This is really hard to explain when i cant litteraly show people.
 

Never_Quit

New Member
Reaction score
16
how does red gain control of throne three if he cannot enter the region? what kind of condition do you need on it?
like a capture the point?
kill all opposing forces?
capture certain unit?
there are many ways you can trigger a turnover of a base

perhaps

unit dies

equal to base

then do set aspect of alliance owner of killing unit and owner of dying unit are allied
 

Dois

New Member
Reaction score
1
This was all very helpful, but i just realized something:
I want it to work out so that once, say player 1, gains control over throne 3, which is originaly teals, then it will allow player 1's builder to enter the region.


This is really hard to explain when i cant litteraly show people.

If I understand you correctly then...

Code:
    Events
        Unit - A unit enters RED dont allow <gen>
    Conditions
        Unit-Type of Entering Unit equal to Builder
        Owner of Entering unit not equal to Owner of Throne 00008
    Actions
        Create special effects...
        Move unit...
 

Squishinator

New Member
Reaction score
3
how does red gain control of throne three if he cannot enter the region? what kind of condition do you need on it?
like a capture the point?
kill all opposing forces?
capture certain unit?
there are many ways you can trigger a turnover of a base

perhaps

unit dies

equal to base

then do set aspect of alliance owner of killing unit and owner of dying unit are allied

Reds BUILDER cannot enter the region, all other units can. I have a trigger that allows a unit to gain control over certain buildings if the unit casts a certain spell.
 

Squishinator

New Member
Reaction score
3
Code:
    Conditions
        Unit-Type of Entering Unit equal to Builder
        Owner of Entering unit not equal to Owner of Throne 00008

Wouldn't it have to be:
Code:
Conditions
    And - All (Conditions) are true
        Conditions
            (Unit-type of (Entering unit)) Equal to Builder
            (Owner of (Entering unit)) Not equal to (Owner of Throne 0008 <gen>)

BUT STILL THAT CODE DOESNT WORK W/ ALLIES
 

Squishinator

New Member
Reaction score
3
to make it easier to understand, it needs to have these 3 conditions:
Code:
(Unit-type of (Entering unit)) Equal to Builder
((Owner of (Entering unit)) is an ally of Player 2 (Blue)) Equal to False
(Owner of (Entering unit)) Not equal to (Owner of Throne 0008 <gen>)

So if the entering unit is a builder, it CAN enter the region IF it owns Thone 0008 OR if it is an ally of the owner of Throne 0008.
 

Dois

New Member
Reaction score
1
Oh okay then is the problem solved?

Edit:
Code:
    Events
        Unit - A unit enters RED dont allow <gen>
    Conditions
        (Unit-type of (Entering unit)) Equal to Builder
        ((Owner of (Entering unit)) is an enemy of (Owner of Throne 0008 <gen>) Equal to True
    Actions
        Create special effects...
        Move unit...
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top