Warcraft III resources & community, 2003–2006 · archived

Click to Cast?

20 posts
#1

Click to Cast?

I need help, I am programming a click defense map and I'm trying to make it that when you click a point on the map while your tower is selected, it orders the tower to cast an ability at that area. It sounds simple but Warcraft is missing alot of needed variables...

Can anyone explain to me how I could do this?
#2

...

m not sure i got your meaning, are you saying that you want to click a button and then target a point, or just click a tower and click a point? Or did i totaly miss the point?
#3
well...

If you have the Guard Tower selected and you right click the ground i want to Tower to cast an ability there, without hitting the ability button
#4
The idea would be to set the rally point of the tower there. And then, every x seconds you can order the tower to cast the ability at its own rally point. It's just what you need.

~Daelin
#5
Thats the thing, if I give the tower the rally ability the game crashes when he uses it, I tried using load and letting it hit terrain but that didn't work either.
#6
You got it wrong... All buildings (atleast so far as I know) have rally point. You don't need to give it. You just have to set a rally somewhere and whenever you want to cast the spell, cast it at the rally point of the building.

~Daelin
#7
Yeah, the rally point is that flag you see on th ground that units produced by the building go to
#8
No, and your not understanding me, the Guard Tower doesn't have a rally point placer.
#9
Then base it off of a unit that does have it, maybe if you give it the ability to produce units it will have one
#10
Hmm... there must be a way to give it the rally point ability. I'll have to test this a little bit before I can tell you my conclusion. Probably if you don't want to get a crash, I'll have to try JASS.

~Daelin
#11
But why go to all that work Daelin, just base it off of a unit producing building so it will have the point.
#12
If it works that way then it's perfect. Announce me how are things going Deathbringer.

~Daelin
#13
The only problem is that it seems kinda sloppy if the building has a unit to hire in its commands...

and as for the rally point thing, if you copy a building that has one and remove the units it can hire it stops having one.
#14
You could still had it buggy but you could do the following trick. Make the unit cost very very much (impossible to hire) and name it something like Pulsar Strike, so it would be like a trick to make people try to buy it. And in its description put somethng like "does 10000 damage to all the enemy units" :lol: .

~Daelin
#15
Ya see, Im VERY picky about my maps and how they are organized so that would bug the hell outta me...

So what were you saying about using JASS?