• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Trigger] Two Problems

Status
Not open for further replies.
Level 9
Joined
Jun 7, 2008
Messages
440
1)you guys already helped me with this, but im afraid when i tested it, it didnt work. I need a more thorough explanation on how to make it so that when a certain percentage of health is lost a sound will play. Percentages such as:
15% health left - or 99% health left.

2)Dr Super Good helped on both problems i guess i didnt understand what he said, and im still gettin my ass kicked trying to test it out. My (-swap) function: When i tried it the way i was told to... it didnt work, so i took it upon myself to try it a different way. I used dialogue buttons, and it worked pretty well. where i got stuck was switching the hero's i just dont know how to do it. Other than just putting the only hero each player gets into a variable, but if i do that. Im still stuck. Any ideas?
 
1) There's an event for when a unit reaches x% life or mana, but I believe it's only for specific units, not units in general.

2) Explain further. At what point do you get stuck?


Also give some info about what the people told you before and why it didn't work.
 
The first problem is really simple,,
Here is the trigger:
  • life
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Entire map)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Percentage life of (Picked unit)) Greater than or equal to 90.00
            • Then - Actions
              • Game - Display to (All players) the text: Life!
            • Else - Actions
 
1) There's an event for when a unit reaches x% life or mana, but I believe it's only for specific units, not units in general.

2) Explain further. At what point do you get stuck?


Also give some info about what the people told you before and why it didn't work.

Okay
  • Events
    • Player - Player x (color) types -swap as an exact match.
  • Conditions
    • Swap = 0
  • Actions
    • Set Swap = (Swap) + 1
    • Dialogue - Show Swap for (triggering player)
    • -------------I have the dialogues set up in a different trigger ----------
  • Events
    • Dialogue - a dialogue button is clicked for swap
  • Conditions
  • Actions
    • If (all conditions are true) then do (then actions) else do (else actions)
      • If - Conditions
        • Dialogue - (clicked dialogue) equal to Red
      • Then - Actions
        • Dialogue -Show Confirmation For Player 1 (red)
      • Else - Actions
        • If (all conditions are true) then do (then actions) else do (else actions)
          • If - Condtions
            • Dialogue - (clicked dialogue) equal to Blue
          • Then - Actions
            • Dialogue - Show Confirmation for Player 2 (blue)
          • Else - Actions
I have 10 playable slots on my map. So this goes on quite a ways. Basically the next trigger is confirmation ===> yes . And now i have to try to figure out how to change control + color of the opposite hero. Each player is only allowed one hero. So. i really dont know how to do it.

EDIT: I think i may be able to do it if i incorporate it so that the hero selection trigger i got will store the picked hero as a variable.. But how to do this?
 
Last edited:
Status
Not open for further replies.
Back
Top