General - Bounty and Units

ReVolver

Mega Super Ultra Cool Member
Reaction score
609
Table of Contents

1. Finding the Trigger Editor
2. Adding the trigger
3. Editing the bounty



Step 1 - Finding the Trigger Editor

Like every WE and WEU out there, the Trigger Editor is found at the top left corner of the
main page of the editor as shown here.

Bounty-1.png


Step 2 - Adding the trigger

Add this trigger to your map to make all enemy units give bounty. Without this trigger, only Neutral Hostile
creeps give bounty. Note that the last action is called
'Player - turn flag on/off for player,' and 'gives bounty' is one of the player flags and we also *if you want* destroy the trigger. (follow steps 1-3)

1.


Bounty-2.png

2.

Bounty-3.png

3.

Bounty-4.png


End Results


Bounty-5.png


Step 3 - Editing the bounty

"Bounty is a random value between 'base + dice' and 'base + dice * sides' "
Every unit has a specific amount of gold they give away by default, but If you what them to drop more gold change it in the object editor.
Recommend Heroes : 200 gold , Hard Creeps : 100 gold and easy creeps or units for 45-60 gold.

Bounty-6.png


Edit: Second Way (Require JASS knowledge)

If you don't want to do it using the first method I mentioned you can use this way.

This is a function made by Vexorian that is very useful: I have added the function and showed an example on how to use it.

JASS:
function Bounty takes player whichplayer, integer bounty, real x, real y returns nothing
 local texttag t=CreateTextTag()
 local string s="+"
    call AdjustPlayerStateBJ( bounty, whichplayer, PLAYER_STATE_RESOURCE_GOLD )
    if bounty<0 then
        set s=""
    endif
    call SetTextTagText(t,s+I2S(bounty),0.025)
    call SetTextTagPos(t,x,y, 0.00)
    call SetTextTagColor(t,255,220,0,255)
    call SetTextTagVelocity(t,0,0.03)
    if (GetLocalPlayer()==whichplayer) then
        call SetTextTagVisibility(t,true)
        set s="UI\\Feedback\\GoldCredit\\GoldCredit.mdl"
    else
        call SetTextTagVisibility(t,false)
        set s=""
    endif
    call DestroyEffect(AddSpecialEffect(s,x,y))
    call SetTextTagFadepoint(t,2)
    call SetTextTagLifespan(t,3)
    call SetTextTagPermanent(t,false)
 set t=null
endfunction



This will give you 20 gold if you kill a Footmen unit type.

JASS:
function Conditions takes nothing returns boolean
    return GetUnitTypeId(GetTriggerUnit()) == 'hfoo' 
endfunction

function Actions takes nothing returns nothing
    call Bounty(GetOwningPlayer(GetKillingUnit()),20,GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
endfunction

//===========================================================================
function InitTrig_BountySystem takes nothing returns nothing
    local trigger trig = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ( trig, EVENT_PLAYER_UNIT_DEATH )
    call TriggerAddCondition( trig, Condition( function Conditions ) )
    call TriggerAddAction( trig, function Actions )
endfunction
 

ReVolver

Mega Super Ultra Cool Member
Reaction score
609
Sure I fix everything and add the pull down menu at the trigger editor
 

Rad

...
Reaction score
228
Hmm thats funny, Ryoko said to downscale the images before he submitted my RPG tutorial and you take his and its all goofy looking... it doesnt even fit into the page... Fix it up!!
 
E

Eilhal

Guest
Great tutorial... I already figured this one out on my own but I wish I would have found this before I wasted all that time working on it without any guidance :p
 

Bird

Ultra Cool Member
Reaction score
29
I was serarching for a solution to a problem I had and this solved it! Thank you.
 

holy_spirit

New Member
Reaction score
25
why u put it in a loop ?? it must works without it cuz ( pick every player ) then ( gives bounty on for picked player )
thats mean every player bountys will turn on and that doesn't need any loop
is that right my friend ????????????? ( im just a beginner in this craft -MAPPING- )
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
If you loop for every player, it gives bounty on for all players.

If you just turn bounty on for neutral (passive or hostile), it turn bounty or neutral, meaning you get gold only for killing neutral, not all the players. :p
 

Hero

─║╣ero─
Reaction score
250
Nice tut...even though I figured this out a long time ago..anyways

+rep
 

ReVolver

Mega Super Ultra Cool Member
Reaction score
609
That is my old tutorial b4 I submitted it to TH :D
 

Oninuva

You can change this now in User CP.
Reaction score
221
What is the forumla to calculate the bounty rate?

Bounty + (Dice x Sides) ?
 

Halo_king116

Working As Intended
Reaction score
153
This is probably pointless, but I would suggest putting...

"Bounty is a random value between 'base + dice' and 'base + dice * sides' "

...Into the actual tutorial. It would defiantly help readers out, and not everyone checks all the posts. Just a suggestion.

Another suggestion is to mention that Player Groups create a Memory Leak (According to Rad's Memory Leak Tutorial)

Just putting those somewhere within the tutorial would only take a moment, and well worth that small amount of time to help beginners. I know the leak is nothing, but hey, whatever. :p

My thoughts. :)
 

ReVolver

Mega Super Ultra Cool Member
Reaction score
609
This is probably pointless, but I would suggest putting...

"Bounty is a random value between 'base + dice' and 'base + dice * sides' "

...Into the actual tutorial. It would defiantly help readers out, and not everyone checks all the posts. Just a suggestion.

Another suggestion is to mention that Player Groups create a Memory Leak (According to Rad's Memory Leak Tutorial)

Just putting those somewhere within the tutorial would only take a moment, and well worth that small amount of time to help beginners. I know the leak is nothing, but hey, whatever. :p

My thoughts. :)

Will do! :rolleyes: Old Tutorial = Old Orc_Tamer :p
 

ReVolver

Mega Super Ultra Cool Member
Reaction score
609
-Bump

Added a second method using a bounty JASS function.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top