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

Help again please...

Status
Not open for further replies.
Level 2
Joined
Jun 20, 2004
Messages
20
How do I make a trigger that sets the amount of gold the player gets when he kills a certain monster?

Thanks! :)
 
Level 2
Joined
Jun 20, 2004
Messages
20
I want a trigger that gives the owner of the tower that kills the creep a specific amount of gold.

If you know a good site that explains all of this to newbs that would be helpfull. :)
 
Level 13
Joined
May 5, 2004
Messages
1,330
Your Trigger

Events
<<Unit - Player-owned unit event>>
Unit - A unit owned by Neutral Hostile Dies

Conditions
<<Player Comparison>>
(Owner of (Killing unit)) Equal to Player 1 (Red)
<<Unit-Type Comparison>>
(Unit-type of (Killing unit)) Equal to [HereYourTower]

Actions
<<Player - Add Property>>
Player - Add 15 to Player 1 (Red) Current gold

The <<text>>-descriptions should show you which event, condition or action you select in the list.

This trigger only refers to Player 1 and one type of tower, so you have to create a trigger for every player. You can build a trigger that is working for every player, but I don't know if you would understand that trigger.
 
Level 2
Joined
Jun 20, 2004
Messages
20
Thanks a lot!

Another problem I stumbled upon is hwo to make countdown clocks.

I have been looking around at tutorials but I haven't found it yet.
 
Level 3
Joined
May 7, 2004
Messages
70
Try This:

Events
<<Unit - Player-owned unit event>>
Unit - A unit owned by Neutral Hostile Dies

Conditions
<<Unit-Type Comparison>>
(Unit-type of (Killing unit)) Equal to [HereYourTower]

Actions
<<Player - Add Property>>
Player - Add 15 gold to (Owner of (killing unit)) Current gold
 
Level 3
Joined
May 7, 2004
Messages
70
I don't understand... Was that sarcasm or were you actually meaning what you said? lol
 
Level 13
Joined
May 5, 2004
Messages
1,330
At first you have to create a timer-variable for your timer. I named it Timer in the example. Then you create a trigger like this one:


TimerTrigger

Events
<<Any event that you want, concerning to what
your're the trigger using for. But don't use "Map Initialization", it won't work.>>

Conditions
<<concerning to the use of the trigger>>

Actions
<<Countdown-Timer - Start Timer>>
Countdown Timer - Start Timer as a Repeating timer that will expire in 60.00 seconds

<<Countdown Timer - Create timer window>>
Countdown Timer - Create a timer window for Timer with title [HereYourTimerName]

<<Countdown Timer - Show/Hide Timer For Player>>
Countdown Timer - Show (Last created timer window) for Player 1 (Red)

This creates/starts a timer that repeats every 60 secs and shows it to player1. If you want every player to see it, use

<<Player Group - Pick Every Player in Player Group And Do Action>>

Player Group - Pick every player in (All players) and do (Countdown Timer - Show (Last created timer window) for (Picked Player))
 
Level 2
Joined
Jun 20, 2004
Messages
20
I am totaly confused, I can't find anywhere that connects this timer to activate the release of my first round of creeps in my TD map.
 
Level 13
Joined
May 5, 2004
Messages
1,330
Aaah, that's what you want. Wait a moment.

OK, at first you create a trigger like the one above (edited it, look it up again). Then you create another trigger:

WaveAttack

Events
<<Timer - Timer expires>>
Time - Timer expires

Conditions

Actions
<<Trigger - Run (checking conditions)>>
Trigger - Run [YourWaveSpawnTrigger] (checking conditions)

Now you have a trigger that spawns new units every 60 secs.
 
Level 3
Joined
May 7, 2004
Messages
70
Oh, sorry DarkShadow, didn't see the post about that =p I am, after all, on 44k Dial-Up. Glad I could help, Adrian5. Good luck with your map.
 
Level 2
Joined
Jun 20, 2004
Messages
20
Thanks, but after the last unit is killed in the first wave I want the timer to start again for the second wave. Will this do that?
 
Level 3
Joined
May 7, 2004
Messages
70
At the end of the trigger that releases the first wave units, have it run the next wave's release trigger. Do the same for each wave.
 
Level 2
Joined
Jun 20, 2004
Messages
20
For some reason the time window wont show up and the time commands aren't being done.

I unchecked the box the says "initially on" for the timmer triggers.

I also have the lines that say show last created timer window to player1 and I repeated that line for Player 2 also.
 
Level 2
Joined
Jun 20, 2004
Messages
20
Ok the timer works fine the problem was that we never put when to activate so when I added to activate it within 5 secs of the game it worked!! Now I'm stuck trying to figure out how to have the whole map revealed! lol
 
Level 3
Joined
May 7, 2004
Messages
70
I'll have to look into this, but here's a solution, if you can complete the circle. You need to add all the units created in the wave to a unit group, then use an action (if, then, else) that, if all the units in the unit group (specified by a variable) are dead, the next wave will begin.
 
Level 13
Joined
May 5, 2004
Messages
1,330
At first, you have to create a new variable:

Variable Name (e.g.): UnitGroupVariable
Variable Type: Unit Group (group)

Then you have to add following action to your UnitSpawn-Trigger:

Actions
<<Unit Group - Pick Every Unit in Unit Group And Do Action>>
Unit Group - Pick every unit in (Units owned by [HereTheAttackingWavePlayer]) and do (Unit Group - Add (Picked unit) to UnitGroupVariable)

Now, your next wave trigger should have this event:

Events
<<Unit - Player-Owned Unit Event>>
Unit - A unit owned by [HereTheAttackingWavePlayer] Dies

Condition
<<Boolean Comparison -> Unit Group - Units Of Unit Group Are Dead>>
(All units of UnitGroupVariable are dead) Equal to True
 
Status
Not open for further replies.
Top