Show info when unit selected

The newbie

New Member
Reaction score
0
I want it to show information about that unit/hero when a player selects it and then choose that hero when he clicks twice/second time. But Ill focus on the description first.
I found this from a map, but I don't know how/why it would work as Im (VERY) bad at integers.

Code:
Hero Descriptions
    Events
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                TempInt Equal to 1
            Then - Actions
                Game - Display to (Player group(TempPlayer)) for 99999.00 seconds the text: |cff008000Warrior|r...
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                TempInt Equal to 2
            Then - Actions
                Game - Display to (Player group(TempPlayer)) for 99999.00 seconds the text: |cff008000Wizard|r - ...
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                TempInt Equal to 3
            Then - Actions
                Game - Display to (Player group(TempPlayer)) for 99999.00 seconds the text: |cff008000Assassin|r -...
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)... ETC.

I can't seem to find the explanation(s) for "TempInt Equal to x", but that must obviously be the "event" equal to selecting a unit. Right?

Reason im not just "Event: player selects Warrior, action: show text" is that then Ill hafta use player Red, player Blue etc. coz I can't do it with a playergroup or anything. Right?

Any suggestions are welcome, thanks in advance ;)
 

Cohadar

master of fugue
Reaction score
209
I think there are a couple of hero selection tutorials/example maps on this forum, search around.
 

MagnaGuard

Active Member
Reaction score
49
I think theres another trigger that sets TempInt to different numbers while different heroes show.
 

The newbie

New Member
Reaction score
0
Code:
Else - Actions
    Unit - Create 1 Fake Selection Thing for (Triggering player) at (Position of (Triggering unit)) facing Default building facing degrees
    Set FakeSelectionUnits[(Player number of (Triggering player))] = (Last created unit)
    Cinematic - Clear the screen of text messages for (Player group((Triggering player)))
    Set Select_Hero[(Player number of (Triggering player))] = (Triggering unit)
    Set TempInt = (Point-value of (Triggering unit))
    Set TempPlayer = (Triggering player)
    Trigger - Run Hero Descriptions <gen> (ignoring conditions)

Must be this, right? But how do I make (Point-value of (Triggering unit)) correspond to the heroes I want it to?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top