| 08-30-2006, 08:39 AM | #2 |
You cant use "(Casting Unit)", because it will be lost after a wait (i think), but if you use triggering unit (might not work if you have many triggers with this running) it should work. Personaly, i reccomend a unit variable... |
| 08-30-2006, 09:06 AM | #3 | |
Quote:
I tried a player variable that failed. You think a unit variable won't? Can I get a confirmation of whether triggering unit will work? Its going to be ALOT of work to change every single thing... |
| 08-30-2006, 09:10 AM | #4 |
What exactly is the bug ? It doesn't display some messages ? Or they aren't displayed properly? Or they overlay each other ? |
| 08-30-2006, 09:35 AM | #5 |
The unit reference from Casting Unit is no longer valid after a Wait action. You should store the player in a local variable. I heard somewhere that you can create a local variable and treat it as a global in GUI, but I've never done it before so you'll have to do some searching. I can assure you that using a local player variable to store the Owner of Casting Unit will work. |
| 08-30-2006, 09:47 AM | #6 | |
Quote:
I promise you it doesn't, because I did just that. I set owner of casting unit to a variable (Temp_Player) and used that local trick to make it MUI. What happened is nothing, exactly that. Nothing displayed except the very first text. Makes me wonder if there is something to do with the conditions.... |
| 08-30-2006, 10:07 AM | #7 | |
Quote:
It does, Casting Unit is lost after a wait, either store casting unit to a global unit or set owner of casting unit to a global. |
| 08-30-2006, 10:15 AM | #8 |
Mind posting the version of the trigger with local variable? You might have done something wrong. I know for sure that using a local player variable would work in this situation. |
| 09-01-2006, 01:57 AM | #10 |
Isnt Casting Unit is the same as trigger unit, its just that casting unit function uses GetTriggerUnit(), where as GetTriggerUnit() is a native (so takes less memory) |
| 09-01-2006, 09:36 PM | #11 |
Can someone look over my code and tell me why it doesn't work at all? And then, what to do to fix it? The trigger is very long so I want to be sure the answer is correct before I change everything. |
| 09-01-2006, 09:53 PM | #12 | |
Quote:
Casting Unit (aka GetSpellAbilityUnit()) is a native function. You need to replace: Trigger: Set Temp_Player = (Owner of (Triggering unit))with Trigger: Set Temp_Player = (Owner of (Casting unit))Make it a habit to use specific functions for specific events (e.g. Casting unit for casting events) instead of using the generic functions. It'll save you a lot of headaches in the long run. |
| 09-01-2006, 10:34 PM | #14 |
1. How about "Unit starts the effect of an ability"? 2. Scrap the do-nothings 3. Scrap the waits OR use timers. (Why do you need them anyway?) Well thats all the advice I can offer... |
| 09-02-2006, 12:29 AM | #15 | |
Quote:
Triggering Unit does work for Spell Effect trigger responses, and it's faster than Casting Unit too. |
