• 🏆 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 make timer before a picked hero will spawn in a region

Status
Not open for further replies.
Level 2
Joined
Aug 25, 2011
Messages
17
How do you make a timer before the picked hero in the tavern go in a specified region.And how do you make the bought hero spawn in a specified region???:vw_wtf::vw_wtf::vw_wtf::vw_wtf::vw_wtf::vw_wtf::vw_wtf::vw_wtf:
PLS. DON'T INSULT I'M REALLY NEW >.<
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
PLS. DON'T INSULT I'M REALLY NEW >.<

Do not yell. Do not spam smilies. Make a clear description of your problem. You can leave out the "How to" from the thread title because it does not add content, it's like everything here are technical questions. Read the sections' subtitles and rules. Your thread would have belonged in World Editor Help Zone. And do not make strange prejudices. If you really feel insulted, you can turn yourself to a moderator. But before that, do not just assume it and do not be whiny.

As from what I could extract your explanation, heroes are bought in a tavern with the standard purchase option. You want to have a visible countdown timer already at the start of the game/before tavern appears. The picked heroes should be grouped up and moved to a specified location or throughout a region once the timer expires. Further I assume you use GUI (Graphical User Interface, triggers created in click,drag&drop menu from the standard editor, no textual script code).

Open trigger editor (F4)

Create a timer variable in variable editor (CTRL+B), no array, preset value is fix to new timer. I call it TimerVar below. Also create a group variable, which I name GroupVar.

Start the timer:
new trigger (CTRL+T)

  • Events
    • <event> //when the timer should appear, maybe Time - Elapsed Game Time event
  • Conditions
  • Actions
    • Countdown Timer - Start TimerVar as a one-shot timer that will expire in <timeOut> seconds //Countdown Timer - Start Timer action, category may also be named Timer or similar, I do not possess the english language version
    • Countdown Timer - Create a timer window for TimerVar with title <title> //Countdown Timer - Create Timer Window, it shows the window on default but cannot at map initialization event (during map's loading time)
Second trigger:
  • Events
    • Unit - <shop> Sells a unit //Specific Unit Event, select your tavern as <shop>
  • Conditions
  • Actions
    • Unit Group - Add (Sold unit) to GroupVar //Unit Group - Add Unit action, Sold unit as in Event response - Sold unit function
Timer expires trigger:

  • Events
    • Time - TimerVar expires //Time - Timer expires
  • Conditions
  • Actions
    • Unit Group - Pick every unit in GroupVar and do (Actions) //Unit Group - Pick Every Unit In Unit Group And Do Multiple Actions, creates a loop iterating through all members of the specified unit group
      • Loop Actions //everything below this (will be indented) belongs to the loop's body
        • Unit - Move (Picked unit) instantly to <location> //Unit - Move Unit (Instantly), Picked unit refers to the unit the loop is currently running for, <location> where you want the units to move to
 
Status
Not open for further replies.
Top