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 haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Ride into the sunset with the 32nd Modeling Contest. The contest is optionally paired. Best of luck, people!
    Dismiss Notice
  4. This adventure has come to an end. Congratulate our heroes in the 16th Mini Mapping Contest Results.
    Dismiss Notice
  5. From the gates of hell, the 5th Special Effect Contest Results have emerged.
    Dismiss Notice
  6. Race against the odds and Reforge, Don't Refund. The 14th Techtree Contest has begun!
    Dismiss Notice
  7. 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:
    682
    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: