HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

stuck

02-11-2006, 07:09 PM#1
pahl
I have a ability that when its used set a variabel and orders the unit to attack, the attack is caught by another trigger and if the variabel is set the a special attack is performed. If the unit just attacks the attack should be a normal one.
Here's my problem, when choosing a target the player can choose to cancel, and cancel can't be detected or disabled. So the variabel will be set untill the next attack and then perform the special one instead of the normal one.
How do i solve this?

And PLEASE don't come with suggestions of other ways to do a special attack or ask why i've done this, then i would have to explain my whole map..
02-11-2006, 07:17 PM#2
Vexorian
no way to detect cancel of commands. You can detect cancel of building / upgrading / trainning though. But the one of targetting can't be detected
02-11-2006, 07:28 PM#3
pahl
ok, got one ide for a solution, but i don't know if it would take to much memory/cpu. Enableing a trigger that looks something like:

Periodic event - every 0.8 secounds (i checked, something like 0.8 should do it)
Game - Force player to press A

and when target is choosen disable the trigger.

Or maybe something like having a dummy unit that attacks instead in the special attack case.
02-11-2006, 07:30 PM#4
Vexorian
well too bad you are not accepting suggestions of alternatives cause I know a way that would probably work the same click-wise and not have this issue
02-11-2006, 07:41 PM#5
pahl
Give it a shot, what alternative?
And my last reply? Would it take a lot of memory?
02-11-2006, 07:48 PM#6
Vexorian
I would actually suggest to avoid using force hotkey . But It doesn't seem heavy memory-wise not even heavy processor-wise
02-11-2006, 08:39 PM#7
HatewarE
why don't you use jass and lokal variables?

well, I don't think you can handle jass if you ask such a question... but you could also make some boolean thingy that sets the variable back to normal if the attack has been cancelled. Or better use the "wait for condition" action in some way.
02-11-2006, 08:51 PM#8
Vexorian
I don't see how that helps at all since THERE IS NO WAY TO DETECT WHEN THE PLAYER PRESSED CANCEL ! .

ok Pahl I will come up with the solution later
02-11-2006, 08:55 PM#9
HatewarE
meh, I said that you could use that wait for condition action if he uses global variables but that's some stupid way to solve it... the best way would be using jass anyway.

jass >>>> GUI
02-11-2006, 09:39 PM#10
Jacek
You know Hateware... thats like third thread when your post is nothing but telling that jass >>>>>> gui. Calm down. Some prefer JASS, some prefer GUI.
02-11-2006, 10:52 PM#11
pahl
err, what good would a wait for condition do if you can't check if cancel was used?
btw i solved the problem by reorganising quite a lot of stuff in my triggers. But Vexorian if you have a solution im still intressted in seeing it, the one i have now is kind of messy.