• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Question about multiboard

Status
Not open for further replies.
Level 25
Joined
Mar 23, 2008
Messages
1,813
I would need some help for my multiboard. Before i decided to use my multiboard in my map i had this trigger to show a timer on when the hero was reborn:

  • RessShaman Copy
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Shaman
    • Actions
      • Countdown Timer - Start ShamanTimer as a One-shot timer that will expire in 25 seconds
      • Countdown Timer - Create a timer window for (Last started timer) with title Time until ressurec...
      • Countdown Timer - Show (Last created timer window) for (Owner of (Dying unit))
      • Game - Display to (All players) the text: A hero has been kil...
      • Wait 25.00 seconds
      • Countdown Timer - Destroy (Last created timer window)
      • Hero - Instantly revive (Dying unit) at (Center of Spawnkillspawn <gen>), Show revival graphics
      • Camera - Pan camera for (Owner of (Dying unit)) to (Center of Spawnkillspawn <gen>) over 0.00 seconds
      • Unit - Set mana of (Reviving Hero) to 100.00%
But this doesnt work if its more than one player with that hero, and it was just just a temporoary solution. But the thing is that i want the ressurection time to show up in my multiboard. Can you just use an integer variable that starts on 25 and goes down by 1 every second and i show it on the multiboard? If someone have a good solution for this to work on my multiboard or could show with a trigger would be much appreciated.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
That's almost the exact same question as I had to solve a few weeks ago.
The guy I had to solve it for didn't post it at the forum, though ;)

The timer I had to create was for a TD, to count down a wave (you can find the triggers under the category "Multi")

Here is the map I had used for it:
(Disclaimer: this map has not been made by me, do not attempt to steal anything from this map or edit it in any way).
 

Attachments

  • Five Team Tower Defence! (Timer).w3x
    79.5 KB · Views: 49
Level 28
Joined
Jan 26, 2007
Messages
4,789
I have attached a file to my post with the code in it, it is easier to copy and it contains everything he needs to know.
What is wrong with that?

Allright, he may not copy any of the other triggers, which I didn't create, but I did create the timer in the multiboard, which is what he asked.
I used the map, because I have written info on the triggers itself.

If you really want me to copy the code here:


  • Timer up
    • Events
      • Time - Next_Level expires
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Countdown Timer - Start Timer[(Player number of (Owner of (Triggering unit)))] as a One-shot timer that will expire in 25.00 seconds

Trigger Comment:
A timer value is a real function, not an integer...

Function 1:
this is a very rapid-changing timer, you can check the miliseconds there.

Function 2:
- use it with "every 0.50 seconds of game time"
- The trigger is "Convert integer to string, convert real to integer", because otherwise you will see this: "41.000 => 40.000 => 39.000 => ..."
With this function, you will see "41 => 40 => 39 => ...."

  • Timer Take
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 10, do (Actions)
    • Loop - Actions
      • Multiboard - Set the text for (Last created multiboard) item in column 2, row (1 + Integer A) to (|cffff0000Revive in: |r + (String((Remaining time for Timer[(Integer A)]))))
      • -------- This is also an option: (check Trigger Comment for info) --------
      • Multiboard - Set the text for (Last created multiboard) item in column 2, row (1 + Integer A) to (|cffff0000Revive in: |r + (String((Integer((Remaining time for Timer[(Integer A)]))))))
Note: Only use one of these options, disable (or delete) the one you do not wish to use.


I have edited a little bit, so it works for heroes, but I'm not really sure, since I can't test it.
Obviously, you will still need a trigger that checks when a timer is finished, but you should be able to handle that yourself.

Note:
Your trigger doesn't work, because of the "wait" I think, the Dying Unit isn't used anymore.
 
Status
Not open for further replies.
Top