Would like help with a trigger problem!

Zonagle

New Member
Reaction score
1
Well, I'm triggering a siege type map, and it's my first try at something like this. I've encountered an error with no way of knowing how to fix it, though I think I may know the problem.

I'm using gates as a first line of defense. The gates sit in between two walls, something like this:

Wall: -
Gate: |||||

-------|||||-------

So that they can't get around the gate.

Now, these are my triggers, and this is the problem.

Event: Time - every 2 seconds of game time.
Condition:
Action: Create 1 Orc Raider at for player 3 Teal at the center of Teal Spawn 1<gen>.
Create 1 Orc Raider at for player 3 Teal at the center of Teal Spawn 2 <gen>.
Create 1 Orc Raider at for player 3 Teal at the center of Teal Spawn 3<gen>.

Event: Time - every 2 seconds of game time.
Conditon:
Action:
If all conditions are true, then do [then actions] else do [else actions]
If - Conditions:
Elven Gate (Horizontal) 0000 <gen> is dead equal to true.
Then - Actions:
Unit Group - Order (units owned by player 3 (Teal)) to move to (center of Teal Rally point 1 <gen>)
Else - Actions:
Unit Group - Order (units owned by player 3 (Teal)) to attack Elven Gate (Horizontal) 0000 <gen>.

The problem: This works okay for about the first 20 seconds, then the units that spawn, stop moving. They just spawn, and stand there. I changed the trigger so as to only spawn 1 unit every 2 seconds, and it worked fine, but 3 seems to make it break. I have 2 towers positioned near the gates killing them as well. With only 1 spawning, they never built up. Might the problem be that, when 3-4 of them get in front of the gate, it blocks the path? Causing the units to not know where to go? If so, how would I fix this? Or is it something else?
 

Holla.

New Member
Reaction score
14
it could have something to do with the speed of it. since you want to spawn 2 units every second, i suggest spawning like 5 every 5 seconds
i think spawning things every second is whats the problem



Oh also, if you think its cause their blocking the path, make raiders's collision size to like, 1 so that they can all get through
 

UndeadDragon

Super Moderator
Reaction score
447
Why are you using 2 different triggers for this? They both have the same event, so combine them into 1 trigger.:

Code:
Event: Time - every 2 seconds of game time.
Condition:
Action: Create 1 Orc Raider at for player 3 Teal at the center of Teal Spawn 1<gen>.
Create 1 Orc Raider at for player 3 Teal at the center of Teal Spawn 2 <gen>.
Create 1 Orc Raider at for player 3 Teal at the center of Teal Spawn 3<gen>.
If all conditions are true, then do [then actions] else do [else actions]
If - Conditions:
Elven Gate (Horizontal) 0000 <gen> is dead equal to true.
Then - Actions:
Unit Group - Order (units owned by player 3 (Teal)) to move to (center of Teal Rally point 1 <gen>)
Else - Actions:
Unit Group - Order (units owned by player 3 (Teal)) to attack Elven Gate (Horizontal) 0000 <gen>.
 

Zonagle

New Member
Reaction score
1
it could have something to do with the speed of it. since you want to spawn 2 units every second, i suggest spawning like 5 every 5 seconds
i think spawning things every second is whats the problem



Oh also, if you think its cause their blocking the path, make raiders's collision size to like, 1 so that they can all get through

Hmm, that's an idea.

I made it so that 1 spawns every 2 seconds to test this (though I want more to spawn, it wouldn't be very siege like otherwise, would it?)'

So I made 2 gates, and use 2 different players with exactly the same triggers (changed for their colors, of course). Teal side had towers that killed the units, so that they never built up, Purple side had no towers, Purple side stop moving, Teal kept going. So I'm thinking it's a pathing issue. I'd rather not change their collision size. Is there a way around this? So that even if they cannot access the gate, they still move in, and queue up around it, to take the place of their fallen ally!

Update: I some more tests! I'm quite sure it's a path blocking problem. Setting it so that 3 spawn evey 6 seconds, with a collision size of 1 didn't help in the end, once the gate had the max amount crowded around it, they stopped moving again.

Is there a different trigger I could use? Say... one that made them move to a location past the gate, that would also cause them to attack the gate, and avoid the blocking problem? :(
 

Zonagle

New Member
Reaction score
1
Why are you using 2 different triggers for this? They both have the same event, so combine them into 1 trigger.:

Code:
Event: Time - every 2 seconds of game time.
Condition:
Action: Create 1 Orc Raider at for player 3 Teal at the center of Teal Spawn 1<gen>.
Create 1 Orc Raider at for player 3 Teal at the center of Teal Spawn 2 <gen>.
Create 1 Orc Raider at for player 3 Teal at the center of Teal Spawn 3<gen>.
If all conditions are true, then do [then actions] else do [else actions]
If - Conditions:
Elven Gate (Horizontal) 0000 <gen> is dead equal to true.
Then - Actions:
Unit Group - Order (units owned by player 3 (Teal)) to move to (center of Teal Rally point 1 <gen>)
Else - Actions:
Unit Group - Order (units owned by player 3 (Teal)) to attack Elven Gate (Horizontal) 0000 <gen>.

I was testing different timing on the attack order code, so I used two different triggers. I've tried it both ways... no luck.
 

HappyPeasant

New Member
Reaction score
8
um your region might be too small make a food limit for teal and a trigger that doesnt let it go over and start it up when it drops down

another problem i saw with your map is that when those units that are dropped destroy the gate they will stay still and not move cause thats all youve asked them to do is kill the gate

add a trigger later says

distructible elvengate001 dies

order all units in tealelvengate move to tealrally
 

BornANoob[MR]

Member
Reaction score
21
Something like this would work for you i reckon.

Code:
FirstOrder
    Events
        Time - Elapsed game time is 5.00 seconds
    Conditions
    Actions
        Unit - Create 10 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
        Unit Group - Pick every unit in (Units in (Playable map area) matching ((Unit-type of (Picked unit)) Equal to Footman)) and do (Actions)
            Loop - Actions
                Unit Group - Add (Triggering unit) to UnitGroup
                Unit - Order (Picked unit) to Attack YourGateHere

Then:

Code:
GateDies
    Events
        Destructible - YourGateHere <gen> dies
    Conditions
    Actions
        Unit Group - Order UnitGroup to Attack-Move To (Center of (RegionBehindGateHere))
        Custom script:   Call DestroyGroup (udg_UnitGroup)
 

Zonagle

New Member
Reaction score
1
um your region might be too small make a food limit for teal and a trigger that doesnt let it go over and start it up when it drops down

another problem i saw with your map is that when those units that are dropped destroy the gate they will stay still and not move cause thats all youve asked them to do is kill the gate

add a trigger later says

distructible elvengate001 dies

order all units in tealelvengate move to tealrally
Alright, I'll give that a try, thanks.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top