• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

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,202
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,202
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,651
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