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

Status
Not open for further replies.
Level 3
Joined
Apr 6, 2007
Messages
45
OK I have custom TownHall...and i tried everything with classification and gameplay constants...but it wont recognize my custom townhall as real townhall.

So I need trigger that would look something like this, but i need help in making it.

Event: Unit Dies
Conditions: Unit-type equal to TempleOfTides
Actions: Set number of player owned townhalls +1
 
I want this:

Events:
Unit - A unit begins construction
Conditions:
(Unit-Type of (Triggering Unit)) Equal to (Temple of Tides)
Actions:
Set Variable = (NumberOfTownHalls +1)

AND

Events:
Unit - A unit dies
Conditions:
(Unit-Type of (Triggering Unit)) Equal to (Temple of Tides)
Actions:
Set Variable = (NumberOfTownHalls -1)

But I dunno how to make that Variable myself.
 
To create a variable, open the trigger editor (yellow a on the bar). From there click the 'x' that is on the bar of the editor itself. Click on create new variable, for this particular purpose use the integer for the variable's type and name the variable NumberOfTownHalls.

Now just use the trigger the way you posted it except for one detail. Don't use

Events:
Unit - A unit begins construction
Conditions:
(Unit-Type of (Triggering Unit)) Equal to (Temple of Tides)
Actions:
Set Variable = (NumberOfTownHalls +1)

if you do this, the constucting town hall may be destroyed before its finished, and your game will read it as the town hall still being alive. Instead use,

Events:
Unit - A unit finishes construction
Conditions:
(Unit-Type of (Triggering Unit)) Equal to (Temple of Tides)
Actions:
Set Variable = (NumberOfTownHalls +1)
 
Erm.....how can't u understand that if i do just this......Variable (NumberOfTownHalls +1) won't have any idea that I want to count TownHalls +1.....cotžz it will be only words without any specific action.

I need to link Unit-Type TownHall with Integer +1.........But I dunno how.
 
Status
Not open for further replies.
Back
Top