1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  4. Dismiss Notice
  5. The Highway to Hell has been laid open. Come along and participate in the 5th Special Effect Contest.
    Dismiss Notice
  6. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

what is wrong with thees triggers?

Discussion in 'Triggers & Scripts' started by Knightmawk, Jul 1, 2009.

  1. Knightmawk

    Knightmawk

    Joined:
    Apr 17, 2008
    Messages:
    44
    Resources:
    0
    Resources:
    0
    I have a spawning trigger set up that is messing up

    • capture her9
    • Events
    • Dialog - A dialog button is clicked for basecap
    • Conditions
    • (Clicked dialog button) Equal to basecapbuttons[2]
    • Actions
    • Unit - Change ownership of Border Station 0023 <gen> to (Triggering player) and Change color
    • Set siegeengine = 0
    • Set footmen2 = 1
    • Set lancer2 = 0
    • Set rangercyd2 = 0
    • Set archercyd2 = 0


    that's just one of the many examples of the instance of this trigger, the map contains a lot more then that that operate in conjuncture and if you need me to post those I will do that also.

    But anyways here is the problem, when I capture a base the spawn triggers
    • footmen3
    • Events
    • Unit - A unit owned by (Owner of New Weston 0009 <gen>) Finishes training a unit
    • Conditions
    • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • (Unit-type of (Trained unit)) Equal to Footmen (3)
    • Then - Actions
    • Set footmen3 = (footmen3 + 1)
    • Unit - Remove (Trained unit) from the game
    • Else - Actions

    • spawn50
    • Events
    • Time - Timer expires
    • Conditions
    • (New Weston 0009 <gen> is Dead) Equal to False
    • Actions
    • Set temppoint = (Center of Rect 015 <gen>)
    • Unit - Create footmen3 Footmen (3) for (Owner of New Weston 0009 <gen>) at temppoint facing Default building facing (270.0) degrees
    • Custom script: call RemoveLocation (udg_temppoint)


    stop working (again those are just one example of all that I have but they are all the same.)

    anyone know my problem?

    Also, as a second note I do have a timer set up it is working just fine, it's a cycling timer that expires every 90 seconds and restarts
     
    Last edited: Jul 1, 2009
  2. Pharaoh_

    Pharaoh_

    Joined:
    Nov 6, 2008
    Messages:
    8,127
    Resources:
    11
    Icons:
    3
    Skins:
    1
    Spells:
    6
    Tutorials:
    1
    Resources:
    11
    In your last trigger ("spawn50"), you have the event "Time - Timer expires". In order to have such an event, you need to have an action in another trigger (e.g. in "footmen3"):
    Countdown Timer - Start Timer as a one-shot timer that will expire in X seconds
    Set Timer = Last created timer

    Then, in your spawn trigger, don't forget to add in the end of the trigger: "Custom script: call DestroyTimer (udg_Timer)".