Need Spell Help

Demonwrath

Happy[ExtremelyOverCommercializ ed]HolidaysEveryon
Reaction score
47
Okay I am making a spell for a Ranger Hero in one of my maps, and this is what it does:

Multikill:
The Hero fires a magical arrow at any enemy units, stunning it for 2 seconds. When the target is hit, the arrow will split into multiple beams that do half of the original damage to unit around the target.
Level 1: 100 Damage, splits and attacks 3 surrounding enemy units
Level 2: 200 Damage, splits and attacks 4 surrounding enemy units
Level 3: 300 Damage, splits and attacks 5 surrounding enemy units

I don't know how I would make this spell. so far all I have is that I could base it off of Storm Bolt for the stun and what not, but I have no clue how to trigger it :(

+rep for anyone who helps
 

Vulcansurge

Ultra Cool Member
Reaction score
27
This is what just first popped into my head. Im not going to put up any triggers for it just yet.

What about when the hero hits the unit (targeted unit is affect by spell maybe?), create X dummy units and make them cast the spell yet again onto three random units in range...

Can be done in JASS and GUI.
 

Demonwrath

Happy[ExtremelyOverCommercializ ed]HolidaysEveryon
Reaction score
47
Okay, well, I need the damage to the other units to be HALF the damage doen the to initial unit.

So on level 1, where it deals 100 dmg to the target, it deals 50 damage to the surrounding targets
 

darkRae

Ueki Fan (Ueki is watching you)
Reaction score
173
First, base it off Storm Bolt.
Make a trigger that periodically picks units with "Stunned (Paused)" buff. Make it to pick that unit with that buff, and create a dummy that stuns the unit with another Storm Bolt but with different buff (not Stunned (Paused))
When that unit is picked (before you stun him again) do a loop that runs 3/4/5 times, each creating a dummy that Storm Bolts random units nearby the unit. But make it so that a unit is not hit twice. So the Conditions under the loop is "the randomly-picked unit is not the original unit and not the unit before"
I know you can do that ;) Or if not, come back here and ask
 

Vulcansurge

Ultra Cool Member
Reaction score
27
EDIT:
Code:
Events:
(CASTER) begins the effects of a spell

Conditions:
(Triggering Unit) equal to (CASTER)
Spell being cast equal to (SPELL)

Actions:
For each blah blah blah... Loop 3 times.
  Create 1 (DUMMY) for Triggering Player at Position of (Target Unit of Spell)
  Set (DUMMY[X]) = Last created unit
Pick every unit in (300 range of (Target Unit of Spell)) and add unit to (UNIT GROUP)
For each blah blah blah... Loop 3 times.
  Set (TARGET[X]) = Random Unit in (UNIT GROUP)
  Order (DUMMY[X]) to (Storm Bolt) (TARGET[X])
  Remove (TARGET[X]) from (UNIT GROUP)

A simple GUI process. Its not perfect yet...
 

darkRae

Ueki Fan (Ueki is watching you)
Reaction score
173
It's not perfect because even before the Storm Bolt hit the unit, the 'arrow' will split, and that'll look strange.

That's why I used 'pick units with buff' and remove the buff and re-stun the unit so the 'splitting' won't happen multiple times.
 

Demonwrath

Happy[ExtremelyOverCommercializ ed]HolidaysEveryon
Reaction score
47
Okay I will try these processes, and see if I can get this working.

Thanks a lot guys =]

EDIT: to darkrae:
I could just make another spell, exactly like Multikill, only each level does 1/2 damage to the original, then the dummies in Vulcansurge's trigger cast that spell, after i set a triger making their spell level equal to the level of the casted one.


Lets get cracking....
 

Vulcansurge

Ultra Cool Member
Reaction score
27
Oh yes. I agree with you. Although, you could use "unit begins casting a spell" (at the very instant the spell is cast) and then add "wait x seconds" to time it to be the right time, and it would be able to be adjusted exactly.

EDIT:

Good luck with the spell :D
Just remember my code probably isn't foolproof and I have forgotten to remove leaks.
 

darkRae

Ueki Fan (Ueki is watching you)
Reaction score
173
@ Vulcansurge
If you use "Unit - A Unit Begins casting an ability" people can abuse it, and making the spell even farther away from MUIness.
 

Tinki3

Special Member
Reaction score
418
Perhaps a demo map could help.
And also, a bit of Custom Script.

Implementation instructions are inside the trigger,
though they are low-quality so don't rely on them too much :)

Have fun (and I hope it's what you wanted).
 

Attachments

  • Multi Kill.w3x
    56.6 KB · Views: 525

Demonwrath

Happy[ExtremelyOverCommercializ ed]HolidaysEveryon
Reaction score
47
Tinki3 that is exactly what i am looking for thank you sooooooo much ^_^

I will +rep everyone who attempted to help me, because every little bit of effort counts.

Now to get Tinki3's thing over to my map...

EDIT: However, I would like you to explain the following parts of the triggering to me:

Code:
    Custom script:   loop
    Set MK_Counter = (MK_Counter + 1)
    Custom script:   exitwhen UnitHasBuffBJ(udg_MK_Target, udg_MK_Buff) or GetWidgetLife(udg_MK_Target) < 0.405 or udg_MK_Counter > 16
    Wait 0.10 seconds
    Custom script:   endloop

I don't understand any of this.... ^


Code:
Loop - Actions
                    Unit - Create 1 Dummy Unit for (Owner of MK_Caster) at MK_Point facing Default building facing degrees
                    Unit - Set level of Multi Kill (dummy) for (Last created unit) to (Level of Multi Kill  for MK_Caster)
                    Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Picked unit)

I don't understand how it casts the dummy abiltiy when you have the order unit to Storm Bolt the target :\
 

Tinki3

Special Member
Reaction score
418
> I don't understand any of this

You've heard of/used/seen the "For Each (Integer A/B)" function, havn't you?
"Loop" is the custom script/JASS version of that.

Everything within "Loop" and "endloop" will loop every 0.1 seconds until:
- The MK_Target has the stun buff, or...
- The MK_Target is dead, or...
- The variable MK_Counter is greater than 16.

This is done with the line:
JASS:
exitwhen UnitHasBuffBJ(udg_MK_Target, udg_MK_Buff) or GetWidgetLife(udg_MK_Target) &lt; 0.405 or udg_MK_Counter &gt; 16

As you can see, the loop will "exit" when any one of those conditions are true.
After that, the actions outside the loop will execute (just like in a normal trigger).
That's when everything starts to happen.
That's when the other units are damaged around the target.

"or udg_MK_Counter > 16" is there for safety, as neither of the other 2
conditions could be true at anytime (or for a very long time).

In saying this, if that line wasn't there, the loop could keep looping for
ages, even when we don't want it to.

If the MK_Counter variable does become greater than 16, it tells us that
the arrow from the the cast-spell has not hit the target within 1.6 seconds.
(Obviously assuming that the arrow wouldn't take that long to hit the target).

It also tells the trigger to do nothing after the looping is done.

"16" might actually be a too shorter time/value to cut-off the dummy-casting.
You might want to increase it to a number around 30-50 to be extra "safe".

> I don't understand how it casts the dummy abiltiy when you have the order unit to Storm Bolt the target

The trigger creates dummy units inside the "Loop - Actions" of the Unit Group function,
and orders each one to cast the dummy ability on each picked unit.
(A dummy is created for each picked unit, btw).

Also, I used Storm Bolt as the base-spell for the dummy ability,
so ordering the unit to "Storm Bolt" the picked units would be a good idea :p.
 

Demonwrath

Happy[ExtremelyOverCommercializ ed]HolidaysEveryon
Reaction score
47
Thanks for the explanation Tinki3 =D

No how would I change up your trigger so that I can make the spell have 5 lvls?
 

Tinki3

Special Member
Reaction score
418
> how would I change up your trigger so that I can make the spell have 5 lvls?

It should be level-compatible as is, following the basic formula for the number of split-shots to be fired from:
Level of (<ability>) for (<unit>) + 2.

The only things you need to change is the ability data via Object Editor.
(That's where the damage/stun comes from).
 

Demonwrath

Happy[ExtremelyOverCommercializ ed]HolidaysEveryon
Reaction score
47
Okay...i umm...can't get this working on my map :( I will post the map in a sec, Tinki3 can you see what's wrong?

EDIT: Umm....I can't upload the map, even though Zipped it is UNDER the max quota (and I have removed all of my other attachements

Tinki3, can you please PM me your e-mail so as I can send you my map that way to get the problem fixed =[
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • 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

      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