| 09-14-2004, 10:17 PM | #1 |
Well i dont now which forum i should use JASS or Trigger. So i use this. ;) My problem is, that the invisible (no model, not hidden) units that i create, dont use their abilities (which where added through JASS Trigger) when i order them to do. I do somthing like: create dummy unit at loc add ability to created dummy unit order unit to use ability remove dummy unit this doesn't work. seams to be a hardcoded blizzard problem. when i create a unit, which already has the wanted ability, everything works fine. so why that works: create unit with ability order unit to use ability and the other not? why players can use an added ability, but not JASS? can somebody help? thx for attention PS: is it possible to change the order string form an ability to own one? not to a predefined one. |
| 09-14-2004, 10:37 PM | #2 |
The order strings are hard coded. I suggest you give that unit to yourself and then add the ability via trigger and look if it actually is there usable. Also check that the ability is left long enough on the unit for it to be used. |
| 09-14-2004, 10:58 PM | #3 | |
Quote:
I tried to give the ability with trigger and then use it with "mouse"! ;) That works fine. I can use the added ability immediately by my self. Would be nice if JASS could do that too. How long should an ability be on a unit before i use it? |
| 09-15-2004, 12:45 AM | #4 |
I did not mean having it some time on the unit before using it but after you order the unit to use the ability it should still have that ability for some time so it can actually execute that order. |
| 09-15-2004, 01:33 AM | #5 |
You need to account for casting time, which is comprised of two components: * The time to TURN TO AIM at the target, this can be eliminated by manually turning the unit with a trigger action, like Make Unit Face Unit over 0 seconds. * The casting time of the ability, most abilities that can only target a single thing cast instantly. For example Storm bolt, sleep, unholy frenzy. Most abilities that target a point or area cannot be cast instantly, ie Shockwave. Sometimes you just have to test it, for example, Frost Nova is cast instantly. Obviously any channeled ability will require time to cast. The only thing you probably have to do is turn the unit to face it's target before issuing the order. (but it does depend on what ability your using) |
| 09-15-2004, 08:45 AM | #6 |
Thank you so much. Now it works fine, i just added call TriggerSleepAction( 0.40 ) after adding the ability and before removing the unit. 0.4 sec was the lowest value which works. and i must add it twice, once doesn't work. that works: create dummy unit at loc face unit where it must face add ability wait 0.4 order wait 0.4 remove dummy unit Next question: When i use two spells, based on the same base spell, both spells are casted, when using one of it. if i change the order string, it also doesn't work. So is it impossible to use two spells based on the same base spell on one unit? Can i disable casting both? thx everybody |
| 09-15-2004, 10:49 AM | #7 |
No you can't. Either use different base abilities, different dummy casters or abilities that allow you to change the base order id (channel, ...). |
