• 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] Need help with a trigger

Status
Not open for further replies.

heki-reki

H

heki-reki

Hello,

I'm pretty new to mapping and especially triggering, so I need some help on this one. I hope you can help me.
The units in my map cost gold every 36.5 seconds, and if the player can't pay for the unit, I want as many units to die as the player can't pay for.
  • bauer
    • Ereignisse
      • Zeit - Every 36.50 seconds of game time
    • Bedingungen
    • Aktionen
      • If (((Triggering unit) is alive) Gleich (Bauer is Eine Land-Einheit)) then do (Spieler - Add -1 to (Owner of (Triggering unit)) Aktuelles Gold) else do (Einheit - Kill (Triggering unit))
So, the paying of the gold works quite fine, but the units don't die if the player can't pay for them. And I don't know how to make a trigger that does this. Can you help me?
 
Last edited by a moderator:
I couldn't really understand your action but I guess you want a trigger that will spawn a player units unless he hasn't the gold to pay for it ?

If that is so, just do a If/Then/Else with the condition of "player[x] gold is equal or greater then X" and then in the action is your spawning.

And please next post your trigger with the trigger tags - [trig.ger]your trigger[/trig.ger] - without the dots.

If you don't know how to convert your trigger into text - right click on the white page ontop of your Events, and click on the "Copy As Text".
Then just Ctrl+V (paste) to write it.
 
No, I don't want units to be spawned, but units who have already been built to be killed if the player hasn't enough gold. That means, if the player's property of gold is = 0, and there are still more units who give the player minus-gold, the units die.

I didn't copy my triggers, because my editor is in german language, and i didn't think you'd understand it if I posted it as it was.
 
cant you type [trigger] [/trigger] :P:P:P

tip :[trigger] [/trigger]

and you can add something in conditions
like Integer co.. Player Property if someones gold is larger then something
 
If he write all function names in german, the icon detection for trigger names in forum will not recognize the lines and he get icons like
if.gif
on every line.
 
Translated:
  • Bauer
  • Events
    • Time - Every 36.50 seconds of game time
  • Conditions
  • Actions
    • If (((Triggering unit) is alive) equal to (Bauer is a land unit)) then do (Player - Add -1 to (Owner of (Triggering unit)) Current gold) else do (unit - Kill (Triggering unit))
translate.google.com pwns :P
 
Status
Not open for further replies.
Back
Top