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. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  4. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  5. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  6. The results are out! Check them out.
    Dismiss Notice
  7. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  8. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  9. 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.

spawning trigger help

Discussion in 'Triggers & Scripts' started by Knightmawk, Jun 30, 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?
     
    Last edited: Jun 30, 2009
  2. darkreapers

    darkreapers

    Joined:
    Jun 1, 2009
    Messages:
    86
    Resources:
    0
    Resources:
    0
    did u want to spawn footman over and over again?
    cause you are removing ur last trainied unit which is the footman
     
  3. skullslasher

    skullslasher

    Joined:
    Aug 17, 2005
    Messages:
    81
    Resources:
    0
    Resources:
    0
    As far as I can tell, the unit is made, you add 1 to the variable footmen3 and then remove the unit.
    What exactly are you trying to do?
    Are you replacing the base with a new base unit if so that is why it stops working.
     
  4. Knightmawk

    Knightmawk

    Joined:
    Apr 17, 2008
    Messages:
    44
    Resources:
    0
    Resources:
    0
    Okay, let me clarrify what this trigger does. The game has a timer going, a spawn timer. each time it runs out you get a spawn, you can upgrade your spawn, add units to it. The variables control that as you "train" the unit in the base it doesn't appear right then but when the timer runs out it, and any other unit you have added will spawn.

    This works, until the base changes ownership.

    (Just realized I posted the add unit to spawn trigger twice and not the actually spawning trigger, my bad, one moment, fixing)