Unit Enters Region Problem

Taishaku

New Member
Reaction score
9
I have a spawn trigger that creates 15 units in the centers of 6 regions.

Now, the trigger to order these units to move has "Unit Enters Region" as the Event. But only the first two regions order their units to move. What is wrong?

I am under the impression that when a unit is made inside of a region, it is also "entering" it.
 

Exide

I am amazingly focused right now!
Reaction score
448
>I am under the impression that when a unit is made inside of a region, it is also "entering" it.
Correct, it enters when it is created.

Can we see your triggers?
 

Taishaku

New Member
Reaction score
9
Code:
Level Setup
    Events
        Time - Timer expires
    Conditions
        Defeat Equal to False
    Actions
        -------- Pause Timer --------
        Countdown Timer - Pause Timer
        Countdown Timer - Destroy (Last created timer window)
        -------- Spawn Setup --------
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Level Less than or equal to 30
            Then - Actions
                Trigger - Run Create Units LL <gen> (checking conditions)
                Trigger - Run Create Units LR <gen> (checking conditions)
                Trigger - Run Create Units ML <gen> (checking conditions)
                Trigger - Run Create Units MR <gen> (checking conditions)
                Trigger - Run Create Units RL <gen> (checking conditions)
                Trigger - Run Create Units RR <gen> (checking conditions)
            Else - Actions
                Trigger - Run Create Boss <gen> (checking conditions)
        Trigger - Run Display Level Info <gen> (checking conditions)
        Wait 1.00 game-time seconds
        Trigger - Run End Level <gen> (checking conditions)

Code:
Create Units LL
    Events
    Conditions
    Actions
        Set Point = (Center of Left Spawn L <gen>)
        Unit - Create 15 Spawn_Type[Level] for Player 12 (Brown) at Point facing Default building facing degrees
        Custom script:   call RemoveLocation(udg_Point)

All the others are similar to this one.

Code:
Left Spawn L
    Events
        Unit - A unit enters Left Spawn L <gen>
    Conditions
        (Owner of (Triggering unit)) Equal to Player 12 (Brown)
    Actions
        Unit - Set the custom value of (Triggering unit) to 2
        Set Order_L = (Center of LL <gen>)
        Unit - Order (Triggering unit) to Move To Order_L
        Custom script:   call RemoveLocation(udg_Order_L)

Code:
Left Spawn R
    Events
        Unit - A unit enters Left Spawn R <gen>
    Conditions
        (Owner of (Triggering unit)) Equal to Player 12 (Brown)
    Actions
        Unit - Set the custom value of (Triggering unit) to 2
        Set Order_L = (Center of LR <gen>)
        Unit - Order (Triggering unit) to Move To Order_L
        Custom script:   call RemoveLocation(udg_Order_L)

These two work.

Code:
Middle Spawn L
    Events
        Unit - A unit enters Middle Spawn L <gen>
    Conditions
        (Owner of (Triggering unit)) Equal to Player 12 (Brown)
    Actions
        Unit - Set the custom value of (Triggering unit) to 1
        Set Order_L = (Center of ML1 <gen>)
        Unit - Order (Triggering unit) to Move To Order_M
        Custom script:   call RemoveLocation(udg_Order_M)

Code:
Middle Spawn R
    Events
        Unit - A unit enters Middle Spawn R <gen>
    Conditions
        (Owner of (Triggering unit)) Equal to Player 12 (Brown)
    Actions
        Unit - Set the custom value of (Triggering unit) to 1
        Set Order_L = (Center of MR1 <gen>)
        Unit - Order (Triggering unit) to Move To Order_M
        Custom script:   call RemoveLocation(udg_Order_M)

Code:
Right Spawn L
    Events
        Unit - A unit enters Right Spawn L <gen>
    Conditions
        (Owner of (Triggering unit)) Equal to Player 12 (Brown)
    Actions
        Unit - Set the custom value of (Triggering unit) to 2
        Set Order_L = (Center of RL <gen>)
        Unit - Order (Triggering unit) to Move To Order_R
        Custom script:   call RemoveLocation(udg_Order_R)

Code:
Right Spawn R
    Events
        Unit - A unit enters Right Spawn R <gen>
    Conditions
        (Owner of (Triggering unit)) Equal to Player 12 (Brown)
    Actions
        Unit - Set the custom value of (Triggering unit) to 2
        Set Order_L = (Center of RR <gen>)
        Unit - Order (Triggering unit) to Move To Order_R
        Custom script:   call RemoveLocation(udg_Order_R)

These don't.

I have been switching my TD from a unit group system to a custom value system.
 

Exide

I am amazingly focused right now!
Reaction score
448
Check your triggers carefully.
In many cases you're setting Order_L, but you are actually ordering your unit to move to Order_R or Order_M.

Example:
Code:
Middle Spawn L
    Events
        Unit - A unit enters Middle Spawn L <gen>
    Conditions
        (Owner of (Triggering unit)) Equal to Player 12 (Brown)
    Actions
        Unit - Set the custom value of (Triggering unit) to 1
        [B]Set Order_L[/B] = (Center of ML1 <gen>)
        Unit - Order (Triggering unit) [B]to Move To Order_M[/B]   [COLOR="Red"]//This point do not exist.[/COLOR]
        Custom script:   call RemoveLocation(udg_Order_M)
 

Taishaku

New Member
Reaction score
9
OHHH...

Wow. I totally forgot to change that variable. Sometimes I guess you just need a fresh set of eyes. Thanks.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top