HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Delaying castingtime by "normal" hits

02-17-2007, 05:44 PM#1
Aray
Just wondering if this is remotely possible to create in some way:

I'm curious about the different ways of delaying/stopping castingtime.

Let's say I have a spell that takes 10 seconds to channel before it is cast. Could it be possible in some way to make normal (physical) hits slow down this castingtime, causing it to take maybe 15 seconds to cast instead of 10?

Example: Each hit slows casting time with 0.25 seconds. UnitA has an attackspeed of 1 hit per second. So if UnitA alone starts hitting a channeling unit (with the 10 seconds spell) it would take the channeler 11.5 seconds (right?) to cast the spell. Is this doable?


I have many more advanced examples, but first I'd like to know if slowing down a castingtime is possible at all...
02-17-2007, 06:38 PM#2
Naakaloh
You could try to simulate a casting time and use a timer... and everytime the unit is hit add 0.25 to the timer. The issue here is actually simulating the channelling well.
02-17-2007, 07:41 PM#3
Aray
Oh, just a quick note ;)
I am not by any means a coder. I just understand a few basic principles but that's it.

I think I understand what you're saying Naakaloh. But in order to have this in a map all spellcasters would have to use timers right? Would this affect the game in any perticular way?..

New question: Could it be possible to force casttimes? Like adding casttime to an ability that originally doesn't have any castingtime...
02-17-2007, 08:17 PM#4
Rising_Dusk
Sure, there's a field for it in the OE on most spells.
It's not the best thing, and doesn't play the animation or cost mana/cooldown until it finishes the time, but it works.

The entire idea here is kinda tough.
The issue being that WC3 really just isn't made to adjust the cast time like that.

You could always make it a channeling spell for a really long time.
Then monitor what the actual time should be in a timer callback and "stop" the hero & do the effects when the timer hits the right time.
Sounds like it might be a bit tough though.
02-17-2007, 09:18 PM#5
Aray
So I guess the conclusion will be that castingtimes delayed/crippled by hitting can infact be done (to a certain extent), but the Wc3 engine isn't exactly made to make adjustments easily.

Mkay, thanks for the input lads :)