Simple trigger problems, help?

skyblader

You're living only because it's illegal killing.
Reaction score
159
Just a piece of advice, you should try it out and then post the results otherwise making a post like that will require you to edit your previous post, and nobody will see the update. Since double posting is not advised.
 

soider8

New Member
Reaction score
0
For the first method, I realized that if that unit is caused to stop building in any way, it would not finish building, and therefore not be ordered to build a new building, which could be problematic. For the second method, I added a condition to check if the unit doesn't have an order, and if it doesn't order it to build. The entire trigger would look like this:
Code:
trigger
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Set Building[1] = Necropolis
        Set Building[2] = Halls of the Dead
        Set Building[3] = Black Citadel
        Set Temp_Group = (Units in Blue Zone <gen> matching ((((Matching unit) belongs to an ally of Player 2 (Blue)) Equal to True) and (((Owner of (Matching unit)) controller) Equal to Computer)))
        Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Current order of (Picked unit)) Equal to (Order(<Empty String>))
                    Then - Actions
                        Set Temp_Point = (Random point in Blue Zone <gen>)
                        Unit - Order (Picked unit) to build a Building[(Random integer number between 1 and 3)] at Temp_Point
                        Custom script:   call RemoveLocation (udg_Temp_Point)
                    Else - Actions
        Custom script:   call DestroyGroup (udg_Temp_Group)
This would periodically pick every unit in your region owned by the correct player who doesn't have an order, and order them to build.

Okay I think this will definetly be the final favour I will ask for,
I need my units to upgrade to another structure automatically,
So I need the bots to cancel the current order of creating units and upgrade,
Its currently like this:
Time - Every 20.00 seconds of game time
Unit Group - Pick every unit in (Units of type Spider Graveyard) and do (Unit - Order (Picked unit) to train/upgrade to a Necromancer)
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
I've already mentioned, double posting is not advised. (Posting twice or more in a row within 24 hours)
Since this is a new question, you're also supposed to start a new thread instead of adding questions to it.
 

soider8

New Member
Reaction score
0
I've already mentioned, double posting is not advised. (Posting twice or more in a row within 24 hours)
Since this is a new question, you're also supposed to start a new thread instead of adding questions to it.

Wouldn't I be wasting thread's then? Rather than using my own thread to ask questions to a specific person..
 

HydraRancher

Truth begins in lies
Reaction score
197
I've already mentioned, double posting is not advised. (Posting twice or more in a row within 24 hours)
Since this is a new question, you're also supposed to start a new thread instead of adding questions to it.

It is related to the same subject so it's acceptable.

Why can't you just order the buildings to upgrade?
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
If you're asking a specific person, it can be done through private messages supported by this forum.

Threads aren't "wasted", that rule is made so that when people search for thread titles to solve their problems, they won't visit a thread that has the same problem, but it is actually solving another problem. (My own thoughts)

Quoted from here.

Multiple Questions

1. Here's the deal. You may ask more than one question in a single thread. But DO NOT ADD MORE QUESTIONS LATER! I.E. no more "User's Question Thread". They are unwieldy and very hard to follow. Start a new thread when you have new questions.

@Hydra Frankly I don't think it's acceptable just because it's related to the subject, but I guess it's something small, can serve as a reminder.
 

Sevion

The DIY Ninja
Reaction score
413
skyblader, you're derailing this thread. If you want to, continue this in PM, as you so graciously suggested yourself.

At any rate, the subject is related to the original trigger. It is acceptable.

/end offtopic...
 
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