Damage skill that gives gold on death

bane25

New Member
Reaction score
1
I'm trying to make a skill that works like storm bolt (i.e. does damage and stuns), and if the target dies while it has that specific stun buff, you get bonus money for it.

Anyone have any ideas?
Thanks ahead of time.

(This is kind of similar to the Dota skill track.)
 
I'm trying to make a skill that works like storm bolt (i.e. does damage and stuns), and if the target dies while it has that specific stun buff, you get bonus money for it.

Anyone have any ideas?
Thanks ahead of time.

(This is kind of similar to the Dota skill track.)

Something like this might work

Trigger:
  • Untitled Trigger 034
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Ability being cast) Equal to (Ability being cast)
    • Actions
      • Player - Add 1000 to (Triggering player) Current gold


Still new though, so don't take my word for it. =P
 
Something like this might work

Trigger:
  • Untitled Trigger 034
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Ability being cast) Equal to (Ability being cast)
    • Actions
      • Player - Add 1000 to (Triggering player) Current gold


Still new though, so don't take my word for it. =P

Well, that might mess up because there's no ability being cast? :p

Probably this is more secure:
Trigger:
  • Give gold when storm bolt kills
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) has buff Stunned (Pause)) Equal to True
    • Actions
      • Player - Add 1000 to (Owner of (Killing unit)) Current gold


In conditions change the has buff to your buff (Stunned (Pause) is the one used for storm bolt I think :p) and actions you set how much gold you want to add.
This is free hand, I haven't tested it. And if you cast storm bolt, and kills it while it's stunned you'll also get gold...
 
Edit: Jomik's triggers will work so long as there is a specific stun buff on the targeted units that is present no where else. If you DON'T have that buff, then:

This probably will work though:

Trigger:
  • Trigger 1
    • Events
      • Unit - A unit starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to <Your ability>
    • Actions
      • Unit Group - Pick all units in Range <the range of your ability> of (Target point of ability being cast) and Unit Group - Add (Picked unit) to Selected --->Unit group variable
      • Timer - Start timer_variable as a one shot <duration of the stun> second one-shot timer


Trigger:
  • Trigger 2
    • Events
      • Unit - A unit dies
    • Conditions
      • (Triggering unit) belongs to Selected
    • Actions
      • Player - Add <gold> to (Owner of (Killing unit) Current gold


Trigger:
  • Trigger 3
    • Events
      • Timer - timer_variable expires
    • Conditions
    • Actions
      • Unit Group - Remove all units from Selected


Note: freehand, not MUI.
 
Well, you'll have to trigger the whole thing...

And detect when the stormbolt hits the unit and then check if it is dead...

@ fgw: Sorry but that won't work, since the event "Unit - A unit Dies" doesn't provide the event response "(Ability being cast)"...
 
I don't see why mine wont work? And he said as long as the unit has the specific buff, it didn't have to die from the spell. But can you please explain why the buff cannot be present anywhere else?
 
well if it was present on another spell, that other spell would also end up having this added bonus
 
jomik's example is the only one that works best for this, only you guys need to understand that this "buff" needs to be created specifically for this spell, not as a all around buff for each and every spell.
I have this idea that he is an experienced mapper, don't judge someone at his post count.

Also, helping people differs from requesting a spell. So an example doesn't have to be exact.
 
@Moridin, Thanks :O I'm trying my best to act like one, seeing for how long I've mapped :p

- I've been mapping with GUI triggers for like 2-3 years, with some breaks though :O -dunno if that makes me a good mapper though :p I pretty much enjoy the scripting, and always get stuck when I have to make the terrain :p Now I'm trying JASS lol :p

And I failed to say that you shouldn't use the buff for anything else. But thought that were pretty much a given :O
But if you decide to use Moridins trigger you should make sure to remove the group and point leak it has :O
 
Woops, thanks Moridin :p I forgot to add the link :O I looked for the link, edited my thread to put it there, but apparently I forgot why I had opened the search :D
 
Yeah, I think I'm gonna actually :p I'd still need to remove those shitty leaks in JASS -.-
 
This post is getting off topic... whatever.

Thanks for all your help (although I do prefer JASS)...

And no, I am not an experienced mapper (unless 1/2 year including breaks counts).




Also: I want it so the caster of the ability gets the money, not the person who actually killed the target (what are allies, anyway?).
 
Well, I think this would be the JASS one:
JASS:
function True takes nothing returns boolean
    return true
endfunction

function Cond takes nothing returns boolean
    return GetUnitAbilityLevel(GetTriggerUnit(), 'BPSE') > 0                                    //Change BPSE to your Buff ID (This is for Stunned(Paused))
endfunction

function Act takes nothing returns nothing
    call SetPlayerState(GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD, 1000)    //Here you can change the gold given (1000 is set now)
endfunction

function InitTrig_Storm_bolt_Addon takes nothing returns nothing
    local trigger t = CreateTrigger()
    local integer i = 0
    loop
        exitwhen i > 15
            call TriggerRegisterPlayerUnitEvent(t, Player(i), EVENT_PLAYER_UNIT_DEATH, Filter(function True))
        set i = i + 1
    endloop
    call TriggerAddCondition(t, Filter(function Cond))
    call TriggerAddAction(t, function Act)
endfunction


But bear with me. This is the first actual trigger I made in JASS by myself :p lol So please answer if it works and such :p

EDIT: Just ran a Syntax Check, found a misplaced ; from my other scripting language :p and the first function should return boolean :p Fixed now lol
 
Freehand :p Probably wont work that well then :D
I just updated the code, there were 2 more errors lol :p Use that one :) I'm tired :D:p
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good

      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