HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Persistent Monsoon

05-05-2005, 10:57 PM#1
marshall
I'm trying to make a spell whereby the caster casts Monsoon at a target location and the Monsoon lasts for X amount of time.
Immediately after the spell is cast, the caster should be able to run away/attack/cast another spell (such as Monsoon again) without ceasing the Monsoon (as happens with the original Monsoon spell or, say, Starfall).

Basically, I want a persistent Monsoon - a Monsoon that does not need to be maintained by the caster.

Any suggestions?
05-05-2005, 10:58 PM#2
Taur
use a dummy to cast monsoon...
05-05-2005, 11:02 PM#3
marshall
I considered having a Ward that cast the spell at it's own location indefinitely but for the spell to cease were the Ward destroyed.
However, I have not been able to conclude how I would do that.
05-05-2005, 11:12 PM#4
Anitarf
It's rather simple. Create the ward in the object editor and give it an ability based on either monsoon or starfall. Then, make the ward-summoning ability based on healing wards (so it displays an area targeting image rather than a point targeting image that is displayed by serpent wards spell). Now, make sure the area of effects on the summoning ability and the ward's damage ability are the same, so the player will see correctly what the ward will damage once it's placed.

Now, all you need more is a simple trigger that runs on generic unit event "unit spawns a summoned unit", has a condition that checks if the type of the summoned unit is equal to your ward, and then a single action that orders the summoned unit to cast starfall/monsoon.

You can make the ward itself either a part of the spell effect, making it visible and destroyable, or, you can give it the locust ability and an invisible model, making it completely untargetable and invisible, that way the monsoon spell would appear to have been cast by the hero himself, without him being required to channel it.
05-05-2005, 11:56 PM#5
marshall
Excellent!
I didn't think to use a trigger - many many thanks!

Let's say I wanted the Ward to be targetable by enemies, but not selectable (I don't want the owner to be able to turn off the Monsoon). Is that possible?
05-06-2005, 12:51 AM#6
Anitarf
If you give it the ward classification, then it won't display buttons such as stop. Give it no movement speed and it also shouldn't respond to right-clicks. However, I'm not sure you can order it to cast the spell with triggers that way... you can try.

An alternative would be to do even more triggering and when the ward is summoned, create an additional dummy unit that will be unkillable and order it to cast monsoon/starfall. Then, link the two units (the summoned ward and the casting dummy unit) with unit variable arrays, custom values or game-cache and remove the dummy unit should the ward be killed. I know, things are getting difficult now...

Another triggered option would be to detect whenever a player selects a unit of the ward type that belongs to him and remove it from selection, thus preventing him from ordering the ward to cease starfall.
05-07-2005, 12:20 AM#7
marshall
It's working brilliantly now, thanks!

Notes:
Ward classification does not prevent the triggered order to cast the spell.
Monsoon of zero duration is indeed zero and not infinite. Decided to go with 3600 seconds.