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 18th Icon Contest is ON! Choose any ingame unit and give him/her Hero abilities. Good luck to all.
    Dismiss Notice
  4. The Secrets of Warcraft 3 have revealed interesting works. The RESULTS for Abelhawk's Mini-Mapping Contest #15 have come out!
    Dismiss Notice
  5. Contestants are to create a scene set in the Stone Age. Come and see what you can come up with. We wish you the best of luck!
    Dismiss Notice
  6. Colour outside the lines! Techtree Contest #13 is a go. The contest is optionally paired.
    Dismiss Notice
  7. Night Rider gained several songs for his journey. The poll for the 12th Music Contest has started. Check it out!
    Dismiss Notice
  8. Greetings cerebrates, our Swarm needs new spawners that will have numerous children. Join the HIVE's 31st Modeling Contest - Spawners and Spawned! The contest is optionally paired.
    Dismiss Notice
  9. Join other hivers in a friendly concept-art contest. The contestants have to create a genie coming out of its container. We wish you the best of luck!
    Dismiss Notice
  10. 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.

How to disable spawn trigger when at 100 limit?

Discussion in 'World Editor Help Zone' started by Neil Aldrin, Jul 12, 2018.

Tags:
  1. Neil Aldrin

    Neil Aldrin

    Joined:
    Apr 15, 2018
    Messages:
    13
    Resources:
    0
    Resources:
    0
    The problem is that it later on the game, there will be so many units fighting then it gets so laggy. I want to disable the spawn trigger when it reaches at 100 limit. Then enable the spawn trigger when it is 99 or below food limit... Any idea using the Trigger Editor?
     
  2. nedio95

    nedio95

    Joined:
    Mar 24, 2011
    Messages:
    1,055
    Resources:
    1
    Spells:
    1
    Resources:
    1
    • Spawn Trigger
      • Events
        • Spawn Event ???
      • Conditions
        • Food for Player X < 100
      • Actions
        • Spawn stuff
    OR
    • Spawn Trigger
      • Events
        • Spawn Event ???
      • Conditions
      • Actions
        • Loop PlayerNumber from 1 to 24
          • If (Food for Player(PlayerNumber) < 100)
            • Spawn stuff for Player(PlayerNumber)


    Syntax is totally off the charts and it has to be a bit polished, but you should understand the idea.

    Hope this helps?
    -Ned
     
  3. Neil Aldrin

    Neil Aldrin

    Joined:
    Apr 15, 2018
    Messages:
    13
    Resources:
    0
    Resources:
    0
    Ummm... can you tell me the step by step? i can't fin the "Spawn Even ???" "Food for Player X < 100" "Spawn stuff"
     
  4. Chaosy

    Chaosy

    Joined:
    Jun 9, 2011
    Messages:
    10,600
    Resources:
    18
    Maps:
    1
    Spells:
    11
    Tutorials:
    6
    Resources:
    18
    Those are hand written, you'll have to fill in the blanks.
     
  5. Neil Aldrin

    Neil Aldrin

    Joined:
    Apr 15, 2018
    Messages:
    13
    Resources:
    0
    Resources:
    0
    But how? how do i write them?
     
  6. nedio95

    nedio95

    Joined:
    Mar 24, 2011
    Messages:
    1,055
    Resources:
    1
    Spells:
    1
    Resources:
    1
    Both of those are plain texts that I wrote just as I wrote this reply to indicate what has to be there.

    "Spawn event" is non existent. I wrote that just for indication. you would place your spawn event there, whatever you like. e.g.
    • Time - Every 5.00 seconds of game time
    or
    • Unit - A unit starts the effect of a spell


    "Food for player" exists, but the syntax is VERY different. It is under Conditions > Integer Comparison.
    You would get a "Left side", a "Right side" and a "comparator"

    On the left side you go:
    Player - Player Property >>> Current food for Player(X)
    Now "Player(X)" also has to be set, it would be something like "Convert player index to player" where player index would be the PlayerNumber variable that I have used.

    Right side you just put in 100

    Comparator is inbetween the two, by default it should be "Equals to" you need to change that to "Less than"

    At the end, it should look like:
    • If - do Then actions else do Else actions
      • If - Conditions
        • Food for Player(TempInt) is Less than 100
      • Then Actions
        • Spawn stuff here
      • Else Actions


    I am not working with WE at the moment, SO, those instructions are from my head, they may NOT be 100% accurate, actually I guarantee that there are some inconsistencies,
    BUT! This should point you in the general direction of everything you need.

    regards
    -Ned
     
  7. Neil Aldrin

    Neil Aldrin

    Joined:
    Apr 15, 2018
    Messages:
    13
    Resources:
    0
    Resources:
    0
    Oh okay thanks, i'm currently working on it right now...