General - Bounty and Units

ReVolver

Mega Super Ultra Cool Member
Reaction score
608
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
608
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
608
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
608
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
608
-Bump

Added a second method using a bounty JASS function.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Varine Varine:
    I ordered like five blocks for 15 dollars. They're just little aluminum blocks with holes drilled into them
  • Varine Varine:
    They are pretty much disposable. I have shitty nozzles though, and I don't think these were designed for how hot I've run them
  • Varine Varine:
    I tried to extract it but the thing is pretty stuck. Idk what else I can use this for
  • Varine Varine:
    I'll throw it into my scrap stuff box, I'm sure can be used for something
  • Varine Varine:
    I have spare parts for like, everything BUT that block lol. Oh well, I'll print this shit next week I guess. Hopefully it fits
  • Varine Varine:
    I see that, despite your insistence to the contrary, we are becoming a recipe website
  • Varine Varine:
    Which is unique I guess.
  • The Helper The Helper:
    Actually I was just playing with having some kind of mention of the food forum and recipes on the main page to test and see if it would engage some of those people to post something. It is just weird to get so much traffic and no engagement
  • The Helper The Helper:
    So what it really is me trying to implement some kind of better site navigation not change the whole theme of the site
  • Varine Varine:
    How can you tell the difference between real traffic and indexing or AI generation bots?
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top