Need Help With Custom "FeedBack" Skill

0WN3D

New Member
Reaction score
15
If you do not know what is feedback ability, it is a skill that burn mana of the attacked unit each time it is hit. Its in the original Warcraft. Well any way... my problem is that I want a skill that burns mana equals to the amount of intelligence the attacked unit have. But it doesnt work. Here's the trigger.
Trigger:
  • Events
    • Unit - A unit Is attacked
    • Conditions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Level of Critical Strikea for (Attacking unit)) Equal to 1
      • Then - Actions
        • Unit - Set mana of (Attacked unit) to ((Mana of (Attacked unit)) - ((Real((Intelligence of (Attacked unit) (Include bonuses)))) x 0.25))
      • Else - Actions
rep for any1 who can help me:D.
 

Skippy

Active Member
Reaction score
39
Are you sure that level of Critical Strike is 1?
Anyway, I think the mana should be burned when the unit takes damage, not when the unit is attacked. However, this is not an error, just an advice.
 

0WN3D

New Member
Reaction score
15
Well I base it off the original crit strike and the onli thing i change is the %.. Its a hero skill i assume it is one as it requires learning.
 

Ayanami

칼리
Reaction score
288
I suggest you don't use "Unit is attacked event" as you'll realize that this event can be abused by spamming "S" when attacking. Here's a way to do it. Base your spell on something that places a buff on attack, for example, Envenomed Spears. I'll use Envenomed Spears as an example here.

Create an Envenomed Spears spell. Ensure that it doesn't require any upgrades and change it to a hero spell if you want. Set the duration of the poison to any duration. Set the values such as damage and movement speed reduction to 0. Now, you need an efficient Damage Detection system. Well, there's several in this forums, and there's 1 neat damage detection system that is GUI-friendly. So, what are you waiting for? Get it today! You do not need any JASS knowledge to use this. Anyways, back to the spell.

Now, you'll need to create 2 buffs, which are originally the 2 buffs from Envenomed Spears. They're Poison (Non-stacking) and Poison (Stacking). Create the buffs and just name it A and B. Doesn't matter. Now, here's the trigger.

Trigger:
  • Feedback
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (GDD_Damaged_Unit has buff A) Equal to True
          • (GDD_Damaged_Unit has buff B) Equal to True
    • Actions
      • Trigger - Turn off (This trigger) <-- To prevent infinite loops
      • Set TempReal = Set TempReal = (Real((Intelligence of GDD_Damage_Source (Include bonuses)))) <-- This is the feedback amount
      • Unit - Set mana of GDD_Damaged_Unit to ((Mana of GDD_Damaged_Unit) - TempReal) <-- Reducing the mana
      • Unit - Cause GDD_Damage_Source to damage GDD_Damaged_Unit, dealing TempReal damage of attack type Spells and damage type Magic <-- Dealing the feedback damage
      • Special Effect - Create a special effect attached to the origin of GDD_Damaged_Unit using Abilities\Spells\Human\Feedback\SpellBreakerAttack.mdl <-- Special effect for your feedback
      • Special Effect - Destroy (Last created special effect) <--Destroying the special effect to prevent memory leak
      • Unit - Remove A buff from GDD_Damaged_Unit <-- Removing the buff applied
      • Unit - Remove B buff from GDD_Damaged_Unit <-- Removing the buff applied
      • Trigger - Turn on (This trigger) <-- Turn the trigger on again


And there you have it, a custom feedback! Only downside is that Buff Placers cannot stack with other Buff Placers. But the original feedback is an Orb Effect anyways. Hope this helps.
 

mapguy

New Member
Reaction score
46
I think he doesn't want it to be orb effect...
since he based the spell on critical strike.
 

Ayanami

칼리
Reaction score
288
I think he doesn't want it to be orb effect...
since he based the spell on critical strike.

He didn't specify. And he didn't say he didn't want it orb effect. He was simply creating a custom feedback to modify the feedback amount to some value * hero's intelligence.
 

0WN3D

New Member
Reaction score
15
Glenphir Well.... I want it to be a custom one that does not involve orb effect... sorry for being vague... But i want to ask something... What if I change the condition for buff into condition for level of my spell? Will it Work?
 

Ayanami

칼리
Reaction score
288
Well.... I want it to be a custom one that does not involve orb effect... sorry for being vague...

I see. To do that, you'll have to trigger all your spell damage. There's no easy way to detect a damage dealt by normal attack unless you trigger all your spell's damage. A most reliable way would be to use a Buff Placer. But if you want to do it the complicated way of using a damage system, by all means.

Replay @ EDIT
Well it will work, but all damage will have the mana burn effect, meaning damage from spells, etc will still have the mana burn effect.
 

hgkjfhfdsj

Active Member
Reaction score
55
another alternative is to base off your spell on (though less accurate, and i wouldnt recommend) onAttack by emjlrs. its method registers when a unit is attacked which sets up a dynamic unit damage event and uses a timer of 2s that destroys the trigger, timer etc. it is when the unit is damaged by the original 'attacker' it registers this as an attack, therefore it isnt as accurate, but close enough
 

mapguy

New Member
Reaction score
46
try this

when the unit attack u add it to a unit group called (ATTACKERS)
when to unit cast a spell or uses an item you move it to (NON-ATTACKER)

then, when a unit takes damage you check if the source_unit is in ATTACKERS group.
 

Ayanami

칼리
Reaction score
288
try this

when the unit attack u add it to a unit group called (ATTACKERS)
when to unit cast a spell or uses an item you move it to (NON-ATTACKER)

then, when a unit takes damage you check if the source_unit is in ATTACKERS group.

There's also passive damaging abilities and there might be damage over time abilities occurring, so your method is flawed. You need a damage system to accurately achieve this. Else, the method hgkjfhfdsj described is the closest.
 

Dirac

22710180
Reaction score
147
mapguy's idea isnt a total mess:

instead of adding casting units to nonattackers, remove attackers from the group when they deal damage, and add em when they attack, so the gap is only between attack animation and missile speed.

Could do some good
 

0WN3D

New Member
Reaction score
15
LOLOLOL... Guess what? I just added a 0.01 sec wait in fornt of all the action and it workz... dunno y lol... Case Closed
 
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

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top