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

[Trigger] Need help with a trigger

Status
Not open for further replies.
Level 1
Joined
Dec 28, 2007
Messages
3
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:
Level 29
Joined
Jul 29, 2007
Messages
5,174
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.
 
Level 1
Joined
Dec 28, 2007
Messages
3
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.
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
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
 

TKF

TKF

Level 19
Joined
Nov 29, 2006
Messages
1,267
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.
 
Level 6
Joined
Nov 28, 2007
Messages
203
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.
Top