• 🏆 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!

Tips popping out from time to time (More complex)

Status
Not open for further replies.
Level 30
Joined
Jan 31, 2010
Messages
3,551
Hi there. I need help with a system, that will pop out game messages for every player, but different to each one, depending on what hero they currently control. Example, if player one uses "Moon Rose" and player two uses "Legend", player one will get a message with a tip about the Moon Rose, while the player two will get a tip about Legend. These tips will be shown like this:

Tip: Since Shadow Raze is both a chasing and escaping tool which deals good damage, it is preferable to max it out first.

The tips will display, every 200 seconds, starting from the point where you selected a hero. They will not go random, and when ended (shown all tips) they will stop.

Thanks for watching my thread.
 
Level 20
Joined
Jul 6, 2009
Messages
1,885
  • Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Tip[1] = first tip for first hero
      • Set Tip[2] = first tip for second hero
      • Set Tip[3] = first tip for third hero
      • -------- ...'till last hero --------
      • -------- 2nd tip --------
      • -------- continue the array --------
      • Set Tip[4] = second tip for first hero
      • Set Tip[5] = second tip for second hero
      • Set Tip[6] = second tip for third hero
      • -------- ...'till last hero --------
      • -------- etc --------
  • Pick hero
    • Events
      • Unit - Tavern 1 Sells a unit
      • Unit - Tavern 2 Sells a unit
    • Conditions
    • Actions
      • Set HeroNumber[(Player number of (Owner of (Buying unit)))] = (Point-value of (Sold unit))
  • Trigger
    • Events
      • Time - Elapsed game time is 200.00 seconds
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Game - Display to (Player group((Picked player))) for 15.00 seconds the text: (Tip: + Tip[(HeroNumber[(Player number of (Picked player))] + (Number of heroes x TipInteger))])
      • Set TipInteger = (TipInteger + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TipInteger Equal to 10
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
Now to explain: In Init trigger,you write all the tips. Follow the pattern,for each hero,write the first tip increasing the array integer by 1 for each. When you do it for all heroes,write second tip for each following the same pattern.

For second trigger to work,you need to set for each hero a specific point value. You can find it in object editor 'Stats - Point Value'.
You need to set these values following the pattern: first hero - 1 point value,second hero - 2 point value etc...
(If you're using the unit point value for something other,you can check which hero is sold and set the HeroNumber integer to correspoding hero)

In third trigger,you just need to put total number of heroes as multiplier in Game message function (look at trigger above) and set
  • If - Conditions
    • TipInteger Equal to 10
to number of tips per hero.

Test map is attached to make it easier to copy triggers.
 

Attachments

  • Tips.w3x
    16.7 KB · Views: 47
Last edited:
Status
Not open for further replies.
Top