• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Autocast with dummy spell

Status
Not open for further replies.
Level 3
Joined
Oct 29, 2013
Messages
51
I have a custom spell that I want auto cast. its based off chain lightning and I'm trying to use a modified version slow as the auto cast dummy ability. all I need is a trigger that will make casting Slow also cast Chain Lighting here is as far as I got.
 

Attachments

  • Untitled.png
    Untitled.png
    44.3 KB · Views: 79
Level 20
Joined
Aug 29, 2012
Messages
826
Use "start the effect of an ability" rather than this event, mostly because this one probably won't work as it is intended for channeled spells.

For your actions, you need to create a dummy caster for the owner of triggering unit at the position of your casting unit, give it a short expiration timer (2-3 sec), add the chain lightning ability to it and order it to cast the spell on the target unit of ability being cast.

You'd also want to create a temp variable to store the point where the dummy is created, so you can safely remove it at the end of your trigger to clean memory leaks.
 
Level 3
Joined
Oct 29, 2013
Messages
51
Use "start the effect of an ability" rather than this event, mostly because this one probably won't work as it is intended for channeled spells.

For your actions, you need to create a dummy caster for the owner of triggering unit at the position of your casting unit, give it a short expiration timer (2-3 sec), add the chain lightning ability to it and order it to cast the spell on the target unit of ability being cast.

You'd also want to create a temp variable to store the point where the dummy is created, so you can safely remove it at the end of your trigger to clean memory leaks.

I'm not very savvy with trigger editing. I can keep looking but I cant find "start the effect" when using the search function or even scanning manually. Is there anyway you could give me a example of how the trigger would look?

Also this map is meant to be rather simple if there is any way to avoid lengthy triggers it would be better for what I'm trying to do
 
Level 13
Joined
Nov 4, 2006
Messages
1,239
  • Chain Lightning AutoCast
    • Events
      • Unit - A unit starts casting an ability
    • Conditions
      • (Ability being cast) equal to "your modified slow"
    • Actions
      • Unit - Order (Triggering unit) to Orc-Farseer - 'Chainlightning' (Target unit of ability being cast)
you can find the action under "Unit - issue order targeting a unit"
 
Level 3
Joined
Oct 29, 2013
Messages
51
  • Chain Lightning AutoCast
    • Events
      • Unit - A unit starts casting an ability
    • Conditions
      • (Ability being cast) equal to "your modified slow"
    • Actions
      • Unit - Order (Triggering unit) to Orc-Farseer - 'Chainlightning' (Target unit of ability being cast)
you can find the action under "Unit - issue order targeting a unit"

I did that trigger string and all it does is cast the modified slow ability there is no secondary ability cast.
 
Level 20
Joined
Aug 29, 2012
Messages
826
I did that trigger string and all it does is cast the modified slow ability there is no secondary ability cast.

This trigger won't work because it assumes that your caster has both slow AND chain lightning.

You need to create a dummy unit when slow is cast, then you can use "order last created unit to orc farseer - chain lightning" as said above.
 
Level 3
Joined
Oct 29, 2013
Messages
51
This trigger won't work because it assumes that your caster has both slow AND chain lightning.

You need to create a dummy unit when slow is cast, then you can use "order last created unit to orc farseer - chain lightning" as said above.

That's what I was asking you to give me an example of "I'm not very savvy with trigger editing. I can keep looking but I cant find "start the effect" when using the search function or even scanning manually. Is there anyway you could give me a example of how the trigger would look?"
 
Level 3
Joined
Oct 29, 2013
Messages
51
Ok I figured it out I had to make sure all the units it applied to had every ability used in the triggering a pretty obvious oversight on my part. I didn't need to make a dummy unit. like I said I want to avoid using to many triggers for something this simple.
Thanks for the help guys this is solved. Ill make sure to give rep.
 
Level 3
Joined
Oct 29, 2013
Messages
51
Last thing just I don't have to make a entire thread how would one trigger a player controlled unit to attack with my custom spell as long as there are enemies in sight?
 
Level 3
Joined
Oct 29, 2013
Messages
51
U want the chainlighting on attack ?

Use the event "unit is attacked"
Condition either unit type = ur unit
Or unit has the ability

Then trigger the dummy unit to cast the spell on the attacket unit

attack using chain lighting when enemy is in range or in sight.
 
Status
Not open for further replies.
Top