• 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.

Lives in hero deff!

Status
Not open for further replies.
Level 2
Joined
Jul 27, 2006
Messages
7
Hi!

I got a Huge problem with my mapping I can't get my "lives" triggers to work right instead of using the lives one by one they use all at the same time and I get deafeted at once!:s

So I need help to get 10 lives not 1

If I have missed somthing u want me to explain more precisely plz post it cuse I really need youre help!
 
Level 13
Joined
Jun 22, 2004
Messages
783
mainly when you set lives, you make a Integer variable and set it to 10 with an action like
  • Set X = 10
The Everytime one live needs to be extracted, you use
  • Set X=X-1
in which X is the integer variable you made
 
Level 2
Joined
Jul 27, 2006
Messages
7
Current Trigger

  • Life 1
    • Events
      • Unit - A unit enters End Region <gen>
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 12 (Brown)
    • Actions
      • Unit - Remove (Entering unit) from the game
      • Game - Display to (All players) the text: Warning a unit have...
      • Trigger - Turn on Life 2 <gen>
      • Wait 0.50 seconds
      • Trigger - Turn off (This trigger)
  • DEAD
    • Events
      • Unit - A unit enters End Region <gen>
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 12 (Brown)
    • Actions
      • Game - Display to (All players) the text: youre dead
      • Wait 2.00 seconds
      • Game - Defeat Player 1 (Red) with the message: Defeat!
      • Game - Defeat Player 2 (Blue) with the message: Defeat!
      • Game - Defeat Player 3 (Teal) with the message: Defeat!
      • Game - Defeat Player 4 (Purple) with the message: Defeat!
      • Game - Defeat Player 5 (Yellow) with the message: Defeat!
      • Game - Defeat Player 6 (Orange) with the message: Defeat!
      • Game - Defeat Player 7 (Green) with the message: Defeat!
      • Game - Defeat Player 8 (Pink) with the message: Defeat!
      • Game - Defeat Player 9 (Gray) with the message: Defeat!
      • Game - Defeat Player 10 (Light Blue) with the message: Defeat!


this is what first life look like and last life and I didn't get the thing with integer could u make a whole trigger so I get the point? :s plz
 
Last edited by a moderator:
Level 5
Joined
Nov 17, 2005
Messages
165
First of all, you need to make a global variable called Lives, which is an intreger with a default value of 10, then you could use a trigger like this:
  • CreepEnd
  • Events
    • Unit - A unit enters End Region <gen>
  • Conditions
    • (Owner of (Triggering unit)) Equal to Player 12 (Brown)
  • Actions
    • Unit - Remove (Entering unit) from the game
    • Set Lives=Lives-1
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Lives Greater than or equal to 1
      • Then - Actions
        • Game - Display to (All players) the text: (Warning! A unit have slipped through your defences! + ((String(Lives)) + lives left!))
      • Else - Actions
        • Trigger - Turn off (This Trigger)
        • Game - Display to (All players) the text: You're so dead!
        • Wait 2.00 seconds
        • Game - Defeat Player 1 (Red) with the message: Defeat!
        • Game - Defeat Player 2 (Blue) with the message: Defeat!
        • Game - Defeat Player 3 (Teal) with the message: Defeat!
        • Game - Defeat Player 4 (Purple) with the message: Defeat!
        • Game - Defeat Player 5 (Yellow) with the message: Defeat!
        • Game - Defeat Player 6 (Orange) with the message: Defeat!
        • Game - Defeat Player 7 (Green) with the message: Defeat!
        • Game - Defeat Player 8 (Pink) with the message: Defeat!
        • Game - Defeat Player 9 (Gray) with the message: Defeat!
        • Game - Defeat Player 10 (Light Blue) with the message: Defeat!
I've attached a demo map aswell
 

Attachments

  • DemoMapforQuiq.w3x
    16.5 KB · Views: 51
Last edited:
Level 7
Joined
Nov 12, 2005
Messages
299
and you might aswell turn off the trigger right after Else - Actions.
it kind of looks stupid when you see
You have -1 lives left
You have -2 lives left
etc. after you get defeated. but that's just my oppinion.
 
Level 13
Joined
Jun 22, 2004
Messages
783
SFilip said:
and you might aswell turn off the trigger right after Else - Actions.
it kind of looks stupid when you see
You have -1 lives left
You have -2 lives left
etc. after you get defeated. but that's just my oppinion.

Those will not be be seen since -1 and -2 are smaller than or not equal to 1, so the then action will not be displayed only the else, but you should close the trigger after you are done with it ^_^
 
Level 2
Joined
Jul 27, 2006
Messages
7
Yea I think I should cuse it keeps showing "you're so dead" all the time =D
 
Status
Not open for further replies.
Top