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

[Spell] The game won't detect the abilities correctly.

Status
Not open for further replies.

adi

adi

Level 2
Joined
May 14, 2015
Messages
11
Hey, i wanted to make custom laser like spells. I made on that is working,
i wanted to add a second one to the same unit and it doesn't work.
I check if a unit casts an ability if true then check if its the laser ability,
and do other stuff, it works fine with one. But when i cast the second one it detects the first ability for some reason. Can someone help how can i fix it?
 
Level 9
Joined
Apr 23, 2011
Messages
527
you can't add two or more abilities based off of the same ability to a unit.
putting them in different spellbooks is a workaround, though. however, if you are using channel as the base ability, simply change the order id.
 

adi

adi

Level 2
Joined
May 14, 2015
Messages
11
Thanks, i was using the shockwave ability. So that means i have to use the channel ability, i guess. I will try it.




Oh, when i put the channel ability on my spell caster it doesn't show in game.
How do I fix that?
 
Last edited:
Level 9
Joined
Apr 23, 2011
Messages
527
some additional information

remember to set the data - options in the channel to ability to visible, else it won't show up

if you want the ability to recreate a shockwave (i prefer carrion swarm because it does not deform the terrain when it travels, but your choice) you're gonna have to make a dummy unit that is created when the unit casts the channel ability, then have it cast the actual shockwave.
 

adi

adi

Level 2
Joined
May 14, 2015
Messages
11
Ok, but if I use a unit how do you make it instantly cast?
And that means i can put my normal shockwave ability on it, and make it cast it?

What is it called on the ability to make it visible?(Channel ability is a hero ability, I made it into a unit ability)
 
Level 9
Joined
Apr 23, 2011
Messages
527
a) set the dummy unit's Art - Cast Backswing and Art - Cast Point to 0.
b) yes. you add the ability based off shockwave on the dummy unit (i do it using triggers, so i can use 1 dummy for most abilities)
c) it's in Data - Options in the object editor.
 

adi

adi

Level 2
Joined
May 14, 2015
Messages
11
Ok, i got everything, when you cast the ability it summons the unit named "caster", i give it a 2 second expiration timer. And which trigger do i use to make the ability cast?
 
Level 9
Joined
Apr 23, 2011
Messages
527
this trigger should sum it up:
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Spell
  • Actions
    • Set loc = (Target point of ability being cast)
    • Unit - Create 1 Dummy for (Owner of (Casting unit)) at (Position of loc) facing Default building facing degrees
    • Set dummy = (Last created unit)
    • Unit - Add Spell (Dummy Spell) to dummy
    • Unit - Order dummy to Orc Tauren Chieftain - Shockwave loc
    • Unit - Remove dummy from the game
    • Custom script: call RemoveLocation(udg_loc)
removing/adding expiration timer accomplish the same objective, so that's fine. a low number like 0.50 also works, since the dummy should cast the ability instantly anyway.
 

adi

adi

Level 2
Joined
May 14, 2015
Messages
11
So if i have a custom spell that means i would make it cast the base ability?
 
Level 9
Joined
Apr 23, 2011
Messages
527
if you meant the part about the order ids, i deleted it because the statement is wrong. pardon me :p

if you mean that if you cast a spell with channel but you want it to use the shockwave effect, then yes.
 

adi

adi

Level 2
Joined
May 14, 2015
Messages
11
My triggers are the ones below. And i still can't get it to work.
The TestAbility is a shockwave ability.
The test1 ability is a shockwave ability too.

The trigger runs. The caster unit doesn't spawn.
I checked. I removed the model of the test 1 to test if it works.
And the caster won't cast the spell.
 

Attachments

  • triggers.png
    triggers.png
    26.3 KB · Views: 71
Last edited:
Level 9
Joined
Apr 23, 2011
Messages
527
the test 1 ability should be based off channel.
did you set the dummy unit's cast backswing and point to 0?
oh, i forgot, set the dummy unit's Movement - Type to none, it should disable the need to turn. also, does the dummy unit use a model? (additional info, make sure the dummy unit has locust and invulnerability, so enemies can't damage it)
 

adi

adi

Level 2
Joined
May 14, 2015
Messages
11
I did set the cast backswing and cast point to 0, and the model is the blink effect because it will not get displayed.

I changed the model so i can see it. It doesn't cast the spell still tho.
 
Last edited:
Level 9
Joined
Apr 23, 2011
Messages
527
i would suggest that you change the model to something like none.mdl.
is the channel ability's Data - Target Type set to Point Target?
is the order string of the dummy ability set to shockwave?
 

adi

adi

Level 2
Joined
May 14, 2015
Messages
11
Oh, I was just being stupid, i forgot to give the caster mana. *facepalms*
 

adi

adi

Level 2
Joined
May 14, 2015
Messages
11
Well i could close the thread, but i still don't get how can i display my channel ability.
Oh wait while i was typing i found it. Thanks for the help.
 
Status
Not open for further replies.
Top