| 01-26-2008, 04:50 AM | #2 | ||
Quote:
I would just put "attack" in the Animation field of the actual ability. That would be easiest, but if for whatever reason you need to trigger it, then you should Pause and Unpause the unit, then issue the animation order. You also might have to use SetUnitAnimationByIndex instead of the usual Animation function, but I think the Pause/Unpause will do the trick. Quote:
You can remove the Attack and Stop buttons together by setting Show UI to false. If you don't want to remove the Stop button with it, I think you can probably just directly remove the attack ability through triggers, its object id is 'Aatk'. |
| 01-26-2008, 04:58 PM | #3 | |
Quote:
Wow, thanks I tested your ideas but I was only about to get the animation to work. What "Show UI to False" are you referring to? I used the one in the object editor under "Combat Attack 1" and it did remove the icon but not stop and it also removed the attack damage icon thing that shows the units attack and such. Is there anyway to remove just all the standard commands on a unit without removing the attack icon thing? Again thanks for your help so far! ![]() |
| 01-26-2008, 07:16 PM | #4 | ||
Quote:
I've actually never tried that myself, just got that from reading other threads, so I guess it was wrong =\. I don't think you can remove attack without removing the attack damage info, and you can't remove move without setting the unit's move speed to 0. You can try removing them individually using the UnitRemoveAbility function, attack's id is 'Aatk' and move is 'Amov'. I think removing Move removes Move and Patrol, and removing Attack removes Attack and Stop. But again, I've never really tried any of this so it's probably all wrong =P. Edit: Here's some stuff I found, not specifically for what you're trying to do but it should help. Quote:
And this thread is kind of interesting. |
| 01-26-2008, 07:33 PM | #5 |
Thanks, when I got on my main computer I'll try that. Good thing is I don't want any of my units to have any commands ever so the first option works perfect. Thanks for all the effort you put into helping. +rep edit: Sorry, can't rep you, I reped you last time. :( edit2: I just tested it and it worked! However... unexpectedly a unit cannot be moved via triggers if it doesn't have the move command, so now I will have to give that back. edit3: K, thank you. I have other problems now but none that relate to this. I actually have to keep all the icons anyways because the unit would either not move or the attack would not show. |
