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

[Snippet] Dummy Caster

If you're going to do that, could you at least write an Advanced Caster library that allows us to cast timed spells?
You'd start out with one dummy unit. If the user wants a spell to be cast while the dummy is casting some other spell, you'd check for any units in the stack, and order one of them to cast the spell. When a unit finishes casting a spell, add him back to the stack.
 
Level 31
Joined
Jul 10, 2007
Messages
6,306
If you're going to do that, could you at least write an Advanced Caster library that allows us to cast timed spells?
You'd start out with one dummy unit. If the user wants a spell to be cast while the dummy is casting some other spell, you'd check for any units in the stack, and order one of them to cast the spell. When a unit finishes casting a spell, add him back to the stack.

No, because casting timed spells on a dummy doesn't make any sense.. cast the timed spell on a regular unit or on the shrine and then have the dummy cast the *effects* and *buffs*

that's what dummy casters are for... there is no AddBuff thing, so you use the dummy for it.
 
Level 10
Joined
May 27, 2009
Messages
494
i suggest the code for castPoint and cast should be the same (difference is the point and immediate order natives) since some spells might be using castPoint that will cast spells (like dummy shockwave) from the caster, something like creating 3 shockwaves which will come from the caster.

and fix set b = IssuePointOrderById(u,this,x,y)
from castPoint

it is failing :D
 
Level 6
Joined
Jun 20, 2011
Messages
249
i made a lib that can support timed spells and cast on group. if anyone thinks that's useful. :| no struct stuff though.

It's not, same reason Nes stated on your thread, plus this allows cast on group kind of tasks. (And not being a struct doesn't influence at all this conclusion)

I would also like Nes to modify this snippet so you can actually move the dummy before casting for those spells that have a native effect, such as chain lightning, to look according the needs (And because he hasn't I had to code my own version of a dummy caster in my map that allows you to do this. It just sets a boolean to true when you move the dummy to another position, and then, when it casts a spell, if the boolean is true it doesn't move the dummy and sets it to false, otherwise if the boolean was equal to false it moves the dummy next to the target)
 
I tested on a small map.
So what? Why not just use the maxX and maxY coordinate? Or as suggested, make it dynamic.

Why would you ever channel a dummy caster spell, you are giving totally unrealistic scenarios.
Uhm, to create channeling spells that are non-channeling for the caster? Such as blizzard and such stuff.

It will work with them... you're supposed to move the units to the caster, not the other way around. Furthermore, it should only be for applying effects like reviving a single unit or stunning a single unit.
Moving units to the caster. WTF? I can give you a PLENTY of scenarious which screw you:

1.) The user wants to see a effect from caster to target with the spell.
2.) The performance will be bad because moving X (while X is >= 1) units is always slower than 1.
3.) AOE spells that are in range won't work properly.

But yeah Nes, you seem to continue making resources mappers won't use. Congratulation.
 
Top