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.

How to pause waves

Discussion in 'Triggers & Scripts' started by darkreapers, Jul 18, 2009.

  1. darkreapers

    darkreapers

    Joined:
    Jun 1, 2009
    Messages:
    86
    Resources:
    0
    Resources:
    0
    Look um i have made 3 mini games for my TD map, but i am having trouble figuring out how to pause the wave spawn when the mini games is starting.

    right now i am triggering next level by checking every 0.50 seconds if brown food is less then 1.

    the mini game i am starting right now with triggers turned off, but when a certain unit enters the map it would turn on mini game. e.g skeletons level 7 enters map.

    turn on mini game run trigger.

    the way iam doing it is very very uneffective, i know, but i am still a noob at map making so any suggestion would be nice.

    also i played a TD where they cant see the mini game area during normal gameplay, but once it starts u teleports u to that zone, anyone know how to do this?
     
  2. Zack1996

    Zack1996

    Joined:
    Dec 18, 2007
    Messages:
    1,088
    Resources:
    3
    Models:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    3
    You need to restrict camera bounds to fit a certain region when you do not want a certain area to be seen.

    For the Mini-Game, I suggest you simply turn off the Wave spawn trigger when a Mini-Game begins and turn it on when the Mini-game ends.
     
  3. ap0calypse

    ap0calypse

    Joined:
    Jan 26, 2007
    Messages:
    4,780
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2
    Instead of checking it every 0.50 seconds, you could also check when a unit dies (the trigger will run less... ).

    In your case, zack is right... the next time, create a different spawn-system ^^
    You should also really read some leak-tutorials... TD's are a massive breeding spawn of leaks, which cause lag and critical errors.

    For the camera bounds: make the regions a bit smaller than the area itself, since the camera bounds are a littel bit bigger than the region you set it to.
     
  4. darkreapers

    darkreapers

    Joined:
    Jun 1, 2009
    Messages:
    86
    Resources:
    0
    Resources:
    0
    do you know a tutorial on how to set the camera bounds? that would be very helpful to me
     
  5. ap0calypse

    ap0calypse

    Joined:
    Jan 26, 2007
    Messages:
    4,780
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2
    Here is the tutorial:

    Start:
    Create a few regions, 1 for each region you want to be shown.
    It should cover a bit less than the entire area, so you won't see the edges of othher terrains.

    Then, when you want to switch terrain, you can use this trigger:
    • Camera - Set the camera bounds for Player 1 (Red) to [Your Region]

    [Your Region] is the region you want to be shown (you can only scroll your camera across the edges of that region, not further).

    To make it more efficient (if it is for multiple players), we can do this:

    • Player Group - Pick every player in (All players) and do (Actions)
      • Loop - Actions
        • Camera - Set the camera bounds for Player 1 (Red) to [Your Region]

    Note: "All Players" does not leak, but if you use another player group (e.g.: "allies of player 1 (Red)"), you need to remove the leak.
     
  6. Vulcano

    Vulcano

    Joined:
    Mar 8, 2009
    Messages:
    335
    Resources:
    1
    Maps:
    1
    Resources:
    1
    A little typo:

    • Player Group - Pick every player in (All players) and do (Actions)
      • Loop - Actions
        • Camera - Set the camera bounds for (Picked player) to [Your Region]