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

Summoning Gold System With Trigger

Status
Not open for further replies.
Level 4
Joined
Jan 12, 2014
Messages
64
Hi Everyone , I Have A Map Like DotA But I Have A Problem With My Summoning Unit , They Don't Have Bounty Gold And I Get Them Bounty Gold Award From Object Editor But Still Not Working. I Want To Do This With Trigger Help Me Pls . Thanks :ogre_haosis:
 
Level 6
Joined
Sep 13, 2013
Messages
155
Note: you should turn on bounty for players to give gold.
If you did so and it didn't work there is a stupid method you can do:
Everytime an enemy killed the summoning unit, you can create an invisible dummy unit that is not invulnerable and has gold bounty, and make the killing unit to deal 100000 damage to the dummy unit created. then it will give you gold also.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
1.How i can turn on bounty for players
Using triggers to change the player state of the player you want to give bounty. Basically all players except Neutral Hostile have bounty disabled by default. However you can change bounty on and off for any player at any time using triggers.

JASS:
PLAYER_STATE_GIVES_BOUNTY
native SetPlayerState takes player whichPlayer,playerstate whichPlayerState,integer value returns nothing
JASS is not required, this can be done using GUI just I do not have the editor open. Like everything digital, a value of 0 will disable bounty and a value of 1 will enable it.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
i write like this code but its not working enough !!!
How can it work any more?! I mean it either does work or not, there is no in between.

I know it does work as long as the units have bounty in the object editor. If it is not working then you are likely not using it (maybe the event never runs, or the thread crashes before it executes the native).
 
Level 25
Joined
May 11, 2007
Messages
4,650
I dont think its necessary to write players exactly on numbers , is it necessary?
Lord can you link for me right trigger for this problem?
No it's not, but it makes for better coding standard and easier to read.
Just add Event - > Map initialization to the trigger you made and it will work.

(Sorry guys didn't see your posts when I made this post).
 
Status
Not open for further replies.
Top