HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Bounty? o.O

11-22-2009, 11:36 PM#1
Itachi[EOSS]
Hey guys I need help... Well yeah, of course I do xD
But anyway... Is there anyway to give bounty to a player, even though the player's unit ownership got changed?

Ex: Player 1's hero uses a spell and he loses control of the hero (the hero's control got switched to Player 12's control) and he kills 5 creeps/units.

How can I make it so the bounty from the units the hero killed while being controlled by Player 12 be given to Player 1?
11-23-2009, 05:48 AM#2
MysticGeneral
There's many ways to go around this. How complex or simple it needs to be depends on more information from your part. My personal preference is to use "Point Value" on units rather than the bounty fields. It's much to complex for my head to use the bounty fields. I like static numbers as well. You can also pick up the point value through integers, making what you need incredibly easy.

If you don't like that, you could set a variable to the hero. Then also set an integer variable to Player 12's currentl gold. When player 12 kills something with Player 1's hero, subtract Player 12's gold with the integer variable. Give that new number to Player 1's gold.

Event: A unit owned by player 12 kills a unit
Condition: Killiing Unit = HeroVar
Action: Set Player 1's gold to (Player 12's Gold - P12PrevGoldVar)

of course that is not multi-instancable nor does it take into the fact that if Player12 gets different kills elsewhere not by that unit. I'm sure you can figure it out from there.
11-23-2009, 10:54 AM#3
Saishy
Is it really necessary to change owners?
Maybe it would be more simply to not let the player control the unit.
11-23-2009, 11:41 AM#4
MysticGeneral
He is obviously changing owner on purpose. It is part of his gameplay for his map.
11-23-2009, 12:10 PM#5
Saishy
Quote:
Originally Posted by MysticGeneral
He is obviously changing owner on purpose. It is part of his gameplay for his map.
Do you know his map?

I wonder because of the last thing you said on your post.
11-23-2009, 09:47 PM#6
Itachi[EOSS]
Thanks MysticGeneral, helped a LOT :D
and Saishy, it isn't necessary, but it was one way of doing this spell I had thought up and wondered about the bounty.