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: 524

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.

      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