• 🏆 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!

How to let a computer cast a spell until its finished?

Status
Not open for further replies.
Level 7
Joined
Mar 10, 2005
Messages
55
hello everyone :),
I want a computer (player 21, I've tried neutral agressive before) to cast my customized death and deacay spell. This spell lasts 20 seconds. (I really want death and decay because of the % unit damage)
I tried using a magician and now im using a lonely tower to cast the spell.
The spell starts correctly for each caster but it always stops after approx. 3 seconds.
What am I missing? :(
 
Level 8
Joined
May 21, 2019
Messages
435
A moderately easy workaround would be to use a channel spell which disables other input while channeling (standard feature of the spell).
Then cast Death and Decay at the target area using a dummy unit or simulate the effect using triggers.
 
Level 8
Joined
May 21, 2019
Messages
435
could you explain this in more detail please? or even make such a spell?
I've created a channel spell but cant cast it.

Before I do anything, please clarify the exact scenario that this spell is used in.
Is it an event, like a scripted bossfight, where this is used at a certain point, or is it just a spell that a computer enemy might cast at you in any given fight, in, say, a custom melee map?
 
Level 8
Joined
May 21, 2019
Messages
435
Im happy to use as much gui as possible.
It will be an event in a boss fight.
The spell should be "death and decay" (because I need % health drain) with the visuals of blizzard.
It will be cast on a given point.
Im using an invisible tower who can cast the spell.
I hope thats all :)
Right... first off, to rule out an AI issue, have you tried changing the owner of the tower to Neutral Hostile? Assuming that this is not a major issue in some way.
 
Level 7
Joined
Mar 10, 2005
Messages
55
It always was neutrale hostile and I tried player 21 to check for differences. There's none, both stop the spell at approximately 3 seconds.
If I cast the spell myself it works for the full 20 seconds.
If there's an AI problem is it possible to turn the whole AI off for some players?
 
Last edited:
Level 8
Joined
May 21, 2019
Messages
435
It always was neutrale hostile and I tried player 21 to check for differences. There's none, both stop the spell at approximately 3 seconds.
If I cast the spell myself it works for the full 20 seconds.
If there's an AI problem is it possible to turn the whole AI off for some players?

You may wanna just simulate the spell using a special effect and a triggered damage event. That way, you don't even need a dummy unit casting in the first place.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,539
Attached an example map below. You have an ability that is based off of Breath of Fire which when cast will create a Dummy unit that is ordered to cast Death and Decay at the targeted point.

I assume the AI can't give orders to Locust (Dummy) units so I think this will work. If it doesn't you can always trigger it pretty easily.

Edit: Attached 2 maps. Death and Decay 1 is the Dummy version. Death and Decay 2 is a triggered version. Note that the triggered version isn't MUI and will bug out if you cast it again while it's already running.
 

Attachments

  • Death and Decay 1.w3x
    18.1 KB · Views: 49
  • Death and Decay 2.w3x
    19.4 KB · Views: 46
Last edited:
Level 7
Joined
Mar 10, 2005
Messages
55
hey Uncle,
many thanks to you!
I was very busy this week so I just got some time to check your maps.
Just finished map 1 and if I use the dummy Unit in my map and its spawned for me (player 1) it works perfectly fine ;) but for player 21 or neutrale hostile it stops after 1 wave of blizzard... :confused:

Seems to be a bug of my map because in a new map it seems to work.
Has anybody an idea where to check or what to reset in the map settings?
 
Status
Not open for further replies.
Top