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.

[Trigger] Stop a training Unit

Discussion in 'Triggers & Scripts' started by Roman_legion, Dec 22, 2008.

  1. Roman_legion

    Roman_legion

    Joined:
    Dec 27, 2006
    Messages:
    9
    Resources:
    0
    Resources:
    0
    If I start training a unit, but an Integer Variable isnt big enough, how do I cancel the training with triggers?
     
  2. Palaslayer

    Palaslayer

    Joined:
    Jun 16, 2008
    Messages:
    1,779
    Resources:
    66
    Icons:
    62
    Packs:
    1
    Spells:
    2
    Tutorials:
    1
    Resources:
    66
    events
    unit - a unit starts training a unit
    conditions
    actions
    if, then, else - mulitple conditions are true
    if - conditions
    integer is smaller or equal to ur value
    then - actions
    unit - order unit to stop

    something like this
    u should search the stop the order actions under category units or if there is, dont remember right now (xD), under orders
     
  3. StaberFire

    StaberFire

    Joined:
    Jun 28, 2008
    Messages:
    683
    Resources:
    8
    Icons:
    4
    Skins:
    1
    Spells:
    3
    Resources:
    8
    I don't think ordering a building to stop will cancel resreach.

    Do what he said, but rather than using "unit- order unit to stop", do

    Selection - Select Triggering Unit for Owner of Triggering Unit
    Player - Force UI Key (Esc)

    I'm not sure of the exact Player action, but it's something close to that. Forcing the player to press the Esc key will cancel any upgrades, training, or researches.
     
  4. Emm-A-

    Emm-A-

    Joined:
    Jul 1, 2008
    Messages:
    1,312
    Resources:
    0
    Resources:
    0
    damit i cant fucking post my dammn solution for this fucking problem SHIT
     
  5. Palaslayer

    Palaslayer

    Joined:
    Jun 16, 2008
    Messages:
    1,779
    Resources:
    66
    Icons:
    62
    Packs:
    1
    Spells:
    2
    Tutorials:
    1
    Resources:
    66
    off topic???
     
  6. Airandius

    Airandius

    Joined:
    Jun 12, 2007
    Messages:
    1,238
    Resources:
    3
    Icons:
    1
    Maps:
    1
    Tutorials:
    1
    Resources:
    3
    You could also save the point of the unit that's training, kill the unit, then create the same unit at that point.
    Then select the last created unit for triggering player or something and clean the point leak.
    Eventhough just making player press esc is faster.. xD
     
  7. Emm-A-

    Emm-A-

    Joined:
    Jul 1, 2008
    Messages:
    1,312
    Resources:
    0
    Resources:
    0
    sry for the post up there, my firefox didnt let me submit things, only this one, i could not edit it after posting it:

    HERE IS THE SOLUTION
     
  8. Roman_legion

    Roman_legion

    Joined:
    Dec 27, 2006
    Messages:
    9
    Resources:
    0
    Resources:
    0
    Ah, nice, thanks alot :thumbs_up: