HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Help, probably simple trigger

07-28-2004, 05:10 AM#1
Sabotage
Hey, this is standard in most maps so its probably simple but help is appreciated, i want to make is so players get gold upon killing units, any units. they would get different amounts of gold per different types of units, but i think i can do that part myself. i just need the actual trigger to make that happen.

something like player1 kills (footmen) give player 1 x amount of gold but every unit would be different.

ive seen this on countless maps so i know its definatly possible, im just horribly bad with triggers.

thx!
07-28-2004, 05:16 AM#2
Nemesis9x
This can be done two ways

First is by settings flags for a player. You can do this by making a trigger like this:
Player - Turn Gives bounty On for Player 1 (Red)
and it would give gold for whoever kills Red's units. To specify how much gold, in the unit editor change Stats- Bounty Awarded values.

The other way is creating a trigger but its harder if you want it for different types of units. If the first method doesnt work how you like it tell me and I can make a trigg for you.
07-28-2004, 06:06 AM#3
Sabotage
thx alot! its so easy yet i never would have thought of it (being the trigger noob i am) lol. so if i just change the bounty value on all the units, say give a footmen 1 and a gryphon 5 then when you kill a footmen itll give 1 and kill a gryphon itll give 5?
07-28-2004, 06:56 AM#4
horusrogue
I see a trigger set in which it gives a random amount of gold (range) for the killing of an enemy unit.
Event - A unit owned by player (insert) is killed
Condition: Unit type of killed unit is equal to (insert)
Action: Add to killing unit's owning player
[Insert a Random Integer Function that will generate a (set range. say 12-20. gold to be added to killing player. This is to make the gameplay a little more interesting, because the unit will give a random number of gold from that integer range upon death)]
It would be a pain to do it for alot of units however...but there is the trigger method.
Note: If you do not want a random value, but a set value, make the action: add player property and insert a value
Action - set player property, player (owner of killing unit)'s gold to (insert value)
If you have help, i can post a (sadly, only a .w3m) if you wish to ever upgrade your map's system to use triggers
-The very sleep deprived, and tired
-Horus
07-28-2004, 10:13 AM#5
Anitarf
I don't think you need triggers for this, the default bounty system already supports random numbers (bounty - dice).
07-28-2004, 03:40 PM#6
Sabotage
Quote:
Originally Posted by Anitarf
I don't think you need triggers for this, the default bounty system already supports random numbers (bounty - dice).

i think you needed the trigger to enable bounty and thats about it.

thanks again for all the help, that random gold is a great idea, gonna look into it.
07-28-2004, 07:21 PM#7
Nemesis9x
The bounty award is like the damage base. You can use this program.