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

cant find the variable

Status
Not open for further replies.
Level 5
Joined
Nov 6, 2008
Messages
150
hey me again
now is a Condition
Lives(variable) Less than or equal to 0
what is that under can't find that.:cry:
this is to a tower defense
 
Level 5
Joined
Nov 6, 2008
Messages
150
im need the
a action so when my life this to zero i dead
where in the Condition menu can i find that and what this is under?

EDIT: i cant find the Condition
there let me cheack my variable
is to zero
 
Last edited:
Level 2
Joined
Feb 1, 2009
Messages
11
Not the best solution...

Likely not the ideal solution, but you could set up an invisible building and set a trigger that destroys that building when the lives hit 0.

Set the victory conditions as that building being destroyed.

Could work for you until you find a better solution.
 
Level 5
Joined
Nov 6, 2008
Messages
150
yeah this is that is my problem i cant find
that thing there let my cheak my life and
when my life hit 0 will i die but i cant find the Condition.
 
Level 5
Joined
Nov 6, 2008
Messages
150
ty that will i try
edit: and yes but i dont have see that one(=
srry i such to english
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,255
Try making a global variable called lives of type integer?

If you can not find it I would recommend giving up mapping and just messing around with triggers until you can find such things then continuing again. As attempting to make a map with little trigger knowledge is not going to lead your map very far.
 
Level 4
Joined
Feb 2, 2009
Messages
71
Dr Super Good.
You're saying he shouldn't create WC3 maps because he don't know how to do?
That attitude is the wont take him anywhere.

Have you heard about learning? Of course he will ask questions others take for granted in the beginning, especially when he's not so good at english. And with all new terms like "real" "integer" "variable"... he's probably pretty confused, but I guess most of us have been there once.
---
spil778
You can use a variable.
In the top you can click the icon with a green "X", I think it's called "Edit Variables".
There you can name the (ex. "Lives") and chose Integer type.

Then you create a trigger like this:
EDIT: Appearently it's not needed anymore :) good luck!
 
Last edited:
First, set the variable for the very first time in map initialization or set the initial value in the variable
  • Map Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Lives = 50
Then, create a trigger that checks whether did a unit leak
  • Leak
    • Events
      • Unit - A unit enters Leak <gen>
    • Conditions
    • Actions
      • Set Lives = (Lives - 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Lives Equal to 0
      • Then - Actions
        • Player Group - Pick every player in (All players) and do (Game - Victory (Picked player) (Show dialogs, Show scores))
      • Else - Actions
 
Last edited:
Status
Not open for further replies.
Top