• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Request] DotA, Morphling's new Waveform ability

Status
Not open for further replies.
Level 2
Joined
Sep 28, 2006
Messages
11
Code:
WaveEffect
	Events
		Unit - A unit Begins casting an ability
	Conditions
		(Ability being cast) Equal to Shockwave 
	Actions
		Unit - Hide (Casting unit)
		For each (Integer A) from 1 to 10, do (Actions)
			Loop - Actions
				Unit - Create 1 Waver for (Owner of (Casting unit)) at ((Position of (Casting unit)) offset by (75.00 x (Real((Integer A)))) towards (Angle from (Position of (Casting unit)) to (Target point of ability being cast)) degrees) facing (Position of (Casting unit))
				Wait 0.05 seconds
				Unit - Kill (Last created unit)
		Unit - Unhide (Casting unit)
		Unit - Move (Casting unit) instantly to (Target point of ability being cast)
I got this from another thread on another forum, but I need some help with putting in the trigger.

Some questions:
1.I'm still confused with setting units to variables.

It lets me set a variable to an already created unit on the map, but not a type (For example, I can't seem to set a Variable for just Peons or Footman in general).

Can I set them to a type?

2. "Unit - Create 1 Waver for (Owner of (Casting unit)) at ((Position of (Casting unit)) offset by (75.00 x (Real((Integer A)))) towards (Angle from (Position of (Casting unit)) to (Target point of ability being cast)) degrees) facing (Position of (Casting unit))"


Is that under "Create units facing angle"? It doesn't have the "offset by (###)" part. Where is it(the exact name)?
 
Level 11
Joined
Jul 12, 2005
Messages
764
you don't have to create dummys here, just create special effects:

Used 'myHero' just for PurplePoot :D

Code:
Action:
    set myHero = TriggeringUnit (instead of casting unit!)
    hide myHero
    loop
       for each integer A
       create special effect to the (point offset by (Integer A * 100) towards (Angle between myHero and Spell Target Point)
       wait 0.1
    move myHero to Spell Target Point
    unhide myHero

The special effect is the naga building death effect (but i think u know that). The wait time is minimum 0.27 second, even if you set it to 0.01 or 0.1. So be prepared that the effect will follow each other after 0.27 sec. If you don't like that, you have to use a timer (or an additional trigger).
The spell is based on Shockwave (or a similar damaging-wave spell) without effects.
 
Level 2
Joined
Sep 28, 2006
Messages
11
Should the whole trigger be this?:

Code:
   Events 
      Unit - A unit Begins casting an ability 
   Conditions 
      (Ability being cast) Equal to Shockwave
Action:
    set myHero = TriggeringUnit (instead of casting unit!)
    hide myHero
    loop
       for each integer A
       create special effect to the (point offset by (Integer A * 100) towards (Angle between myHero and Spell Target Point)
       wait 0.1
    move myHero to Spell Target Point
    unhide myHero
Also, under "Hide myHero" which is loop, it's "Loop Actions" right? How do I add one of those?

And for
Code:
       create special effect to the (point offset by (Integer A * 100) towards (Angle between myHero and Spell Target Point)

What is it called in the trigger editor exactly? Is it "For Each Integer A, Do Action"? And what is the exact name for the "Action" (I have problems finding the things.


Also, another question, for some reason under the "events" section, I can't put "A unit". I can only click "No unit".

Actually can you make a map with the triggers in it, and upload it so I can download and copy and paste?
 
Level 11
Joined
Jul 12, 2005
Messages
764
Uh, oh... I see u're a beginner, but you didn't wrote it.
1. I don't know what you want with 'Actions'.
2. For the effect: Special Effect - Create special effect at location
3. A loop is 'For each integer A do (multiple) actions'
4. If you can't make this extremely simple spell, you will have serious problems in making you own map, and spell. Play around the Trigger Editor a bit before starting a whole work...
So i won't make it for you. (In the interest of you...)
 
Level 2
Joined
Sep 28, 2006
Messages
11
I'm pretty good with everything else but the triggers.

I mainly make "modified warcraft 3" maps, as in it's basically a melee map with modified stats, abilities, units etc. Right now I'm adding custom heroes, and thought of trying some custom spells for my heroes.


But I'm getting to learn the triggers. The reason why I was wondering about the variable/event thing, was because I used "Specific Unit Event" instead of "Generic Unit Event".

I'm going to try it later though.
 
Level 4
Joined
Aug 3, 2006
Messages
45
For the effect: Special Effect - Create special effect at location

Its better when you first make a Variable named MyLocation.
Than in the trigger make

Set MyLocation = Point of Triggering Unit

Than make
Specialefect Create a Special Effect at ((myLocation) offset by (Integer A * 100) towards (Angle between myHero and Spell Target Point))

Than at the ned use a Custom Text

call RemoveLocation(udg_MyLocation)

That cleans up 1 leak and makes the time after the game shorter. it can be a bit difficult for you.

Ive made an Demo Map you can Download it HERE
Just click on Waveform and than Download it.
 
Level 1
Joined
Oct 7, 2006
Messages
3
Code:
Action:
set myHero = TriggeringUnit (instead of casting unit!)
hide myHero
loop
for each integer A
create special effect to the (point offset by (Integer A * 100) towards (Angle between myHero and Spell Target Point)
wait 0.1
move myHero to Spell Target Point
unhide myHero

where you used for each integer A, what are the integers? has to be for each integer A from _ to _
 
Level 1
Joined
Oct 7, 2006
Messages
3
oh nevermind i figured it out it would be
For each integer A from 1 to ((integer((distance between(position of(triggering unit)) and (target point of ability being cast))))/100, do (actions)
 
Level 2
Joined
Sep 28, 2006
Messages
11
XxLuciferxX said:
For the effect: Special Effect - Create special effect at location

Its better when you first make a Variable named MyLocation.
Than in the trigger make

Set MyLocation = Point of Triggering Unit

Than make
Specialefect Create a Special Effect at ((myLocation) offset by (Integer A * 100) towards (Angle between myHero and Spell Target Point))

Than at the ned use a Custom Text

call RemoveLocation(udg_MyLocation)

That cleans up 1 leak and makes the time after the game shorter. it can be a bit difficult for you.

Ive made an Demo Map you can Download it HERE
Just click on Waveform and than Download it.

Thanks a lot! A few questions though about the spell.

I set the distant to 2000 and cast range to 2000, but if I click far away, sometimes the morphling will move to the middle of the map instead of where it was pointed to go at. Know how to fix this?

Also, in DotA, the actual spell didn't go farther than the animation. Like, even if the range is 1000, if you just click 100 range away, and the enemy is only 200 range, the enemy won't get hit.


Anyway, DotA's version of special effect is "faster". Has to do with somehow making the min speed of 0.27 smaller than that. Anyone know how to do it?

Again, thanks a lot.
 
Level 11
Joined
Jul 12, 2005
Messages
764
I didn't want to confuse SamuraiGorge's head with the location leak, that's why I didn't write it.

I don't have World Editor on this computer, so i wrote the text from head. And due to I haven't make a GUI trigger for months (I use JASS), the code is not accurate...

And Lucifer, this still leaks:
Set MyLocation = Point of Triggering Unit

Than make
Specialefect Create a Special Effect at ((myLocation) offset by (Integer A * 100) towards (Angle between myHero and Spell Target Point))

Than at the ned use a Custom Text

call RemoveLocation(udg_MyLocation)

The leakless one look like this:

set MyLoc[1] = Point of Triggering Unit
set MyLoc[2] = Spell Target Point
set MyLoc[3] = Point offset by (Integer A * 100) towards (Angle between MyLoc[1] and MyLoc[2]))
Special Effect - Create a Special Effect at MyLoc[3]
then remove all 3 locations...
 
Level 2
Joined
Sep 28, 2006
Messages
11
Again, thanks for your efforts for waveform and sharing it XxLuciferxX.

About the waveform speed effect, I've tried lowering the wait time myself, it doesn't actually make it faster.

I even tried putting it to wait 0.00 seconds, it didn't move faster.

Then, I disabled the wait trigger temp to see if it moved instantly, it did. The effect moved instantly, as in the morphling teleported from point A to point B instantly.

When I put wait 0.00, it just was stuck as 0.27 seconds(it appears) as paskovich as apparently said about the min wait time.

Paskovich, you also said something about using some timer trigger or so to allow it to become faster, can you explain a little more?

Edit: Also, does anyone know how in the DotA map, they made it so that the actual damaging spell(Waveform) doesn't go farther than the animation? If it's based on crushing wave or shockwave, it will always go the distance in that is specificed in the Object editor - Abilities section.

So, if Shockwave goes as far as 700 distance, and you click 300 distance away from your hero, it will still go 700. If you click 700 distance away from your hero, then it will go 700 distance.

Maybe it's some trigger that changes the distance "stat" depending on how far you click?

So, lets say you click 300 distance away from your hero, the trigger will then reset the spell's distance to 300.

If you click 700 distance away, then it will reset the spell's distance to 700?


Of course, I can only imagine how custom spells/abilities work, and not actually know how to do the actual triggers myself, but that's how I imagine it works.

I'll appreciate more help with triggering and more "demo" maps on how things work.

I used to be a really good starcraft mapper, really good triggering.

I learned triggering, by looking at other mapper's map, and looking at how they made their triggers, to make things work in the game. And that's how it I learned.

Obviously, Warcraft 3's triggers are more complicated and have more options than Starcraft triggers, so it'll take longer for me to learn it.
 
Level 11
Joined
Jul 12, 2005
Messages
764
Well, learning takes time, but practice makes perfect. ;)
About the "timer":
You need two :!: triggers:
The first one triggers when the spell is cast, then store the caster, and the target point into a variable: (sry i can't write it exactly how it looks like...)

//========
Trigger#1:

Event - spell effect
Cond - spell == Waveform
Action
Set myHero (unit variable) = Triggering Unit
Set myHeroLoc (point var) = Point of myHero
Set TempLoc (point var) = myHeroLoc
Set TargetLoc (point variable) = Spell Target Point
Set WFlength (real var) = Distance between myHeroLoc and TargetLoc
Set WFcounter (integer var) = 0
Hide myHero
Turn on Trigger#2

//========
Trigger#2:

Code:
Events:
   Every 0.05 seconds of the game (It's under Timer - Periodic events)
Conditions:
none
Actions:
   If
     WFcounter less then WFlenght
   Action
     Set TempLoc (point var) = TempLoc offset by 75.00 towards (Angle from (myHeroLoc) to (TargetLoc)
     Create Spec Effect at TempLoc
     Pick Every Units in 300 range of TempLoc and do
       Actions
         Cause myHero to damage (Picked unit) for blabla..
     Set WFcounter = WFcounter + 75
   Else
     Set myHero's position to TempLoc
     Unhide myHero
     Turn off This Trigger

A few variables are needed... If it doesn't work (it is supposed to work), just write.

Gghhrr.. I hate GUI. It was a nightmare to type this. LEARN JASS! :D
 
Status
Not open for further replies.
Top