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

fgw

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

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
 

jomik

New Member
Reaction score
17
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...
 

Moridin

Snow Leopard
Reaction score
144
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.
 

Komaqtion

You can change this now in User CP.
Reaction score
469
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)"...
 

jomik

New Member
Reaction score
17
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?
 

Slapshot136

Divide et impera
Reaction score
471
well if it was present on another spell, that other spell would also end up having this added bonus
 

Xorifelse

I'd love to elaborate about discussions...........
Reaction score
87
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.
 

jomik

New Member
Reaction score
17
@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
 

jomik

New Member
Reaction score
17
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
 

jomik

New Member
Reaction score
17
Yeah, I think I'm gonna actually :p I'd still need to remove those shitty leaks in JASS -.-
 

bane25

New Member
Reaction score
1
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?).
 

jomik

New Member
Reaction score
17
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
 

jomik

New Member
Reaction score
17
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.
  • Ghan Ghan:
    Howdy
  • 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 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