• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

How to teleport heros to arena

Status
Not open for further replies.
Level 1
Joined
Oct 25, 2018
Messages
1
So in my map you start with a wisp and enter a circle of power to select a hero, this will spawn your hero and some of his races buildings in an enclosed area where i have wave of creeps spawning every 45 seconds which will attack you. Im wondering how to pause every like 10 waves, teleport the heros to an arena so they can fight eachother 1v1 and than teleport back to their base and continue the waves. thanks.
 
Level 39
Joined
Feb 27, 2007
Messages
5,010
You'll need to use a timer variable to control the waves instead of a periodic event. When the timer expires for the 11th time and would start the 11th wave, pause everything on the map except the heroes, move the heroes to your arena area, and wait for the duel(s? you said 1v1) to end. When you detect that end, unpause all the units and resume the timer.

  • ------- in map initialization --------
  • Countdown Timer - Start WaveTimer as a Repeating timer that will expire in 45.00 seconds
  • -------- now your wave trigger looks like this --------
  • Events
    • Time - WaveTimer expires
  • Conditions
  • Actions
    • -------- do all your spawning stuff here --------
    • Set WaveCount = WaveCount + 1
    • If (All conditions are true) then do (Then actions) else do (Else actions)
      • If - Conditions
        • WaveCount greater than 10
      • Then - Actions
        • Set WaveCount = 1
        • Countdown Timer - Pause WaveTimer
        • Set HeroGroup = Units in (Playable map area) matching (((Owner of (Matching Unit)) controller equal to User) and (((Matching Unit) is a Hero) equal to true))
        • Custom script: set bj_wantDestroyGroup = true //cleans a group leak in the next line
        • Unit - Pick every unit in (Units in (Playable map are) matching (((Matching unit) is in HeroGroup) equal to false) and do (Actions)
          • Loop - Actions
            • Unit - Pause (Picked Unit)
        • -------- more things will have to go here to move the heroes but I can't specifically suggest what because I don't know what variables for heroes, starting locations, teams, etc. you already have in your map --------
        • -------- also how do you want the duels to work? I presume you're thinking of Custom Hero Survival? --------
      • Else - Actions
 
Status
Not open for further replies.
Top