| 09-14-2006, 03:36 AM | #1 |
I'm trying to use a script to call a 2nd inferno after the first. JASS:function Trig_Inferno_Actions takes nothing returns nothing local unit c = GetTriggerUnit() local unit u local location l if GetUnitAbilityLevel(c,'AUin')==2 then set l=GetSpellTargetLoc() set u=CreateUnit(GetOwningPlayer(c),'e003',GetUnitX(c),GetUnitY(c),0) call UnitAddAbility(u,'AUin') call TriggerSleepAction(1) call IssuePointOrderByIdLoc(u,1096116590,l) call TriggerSleepAction(1) call RemoveUnit(u) call RemoveLocation(l) set u=null set l=null endif set c=null endfunction I've tried resetting the cooldown, changing the ability to non-hero, using a different dummy, and even using the Dreadlord again by resetting the cooldown first, but nothing. I'm also sure that the SpellId is correct. I checked it with display in game. |
| 09-14-2006, 03:40 AM | #2 |
Check the mana cost of the spell and the range of the spell as well. JASS:call TriggerSleepAction(1) call RemoveUnit(u) JASS:call UnitApplyTimedLife(u, 'BTLF', 1.0) It works better, doesn't require the sleep, and is fewer lines. Win-win. :D |
| 09-14-2006, 04:01 AM | #3 |
Thanks I'll use applied life, but still haven't resolved the issue at hand. The dummy has more than enough mana, and it's not the range. |
| 09-14-2006, 04:17 AM | #4 |
Make sure the dummy unit's Cast Point and Cast Backswing are both set to 0. That way it'll be cast immediately. The dummy ability should be a unit ability as well. Also -- A normal Dreadlord can't get level 2 inferno. Are you sure it's even getting into that conditional? Add a BJDebugMsg(). Getting dummies to cast spells really isn't that tricky. If it becomes tricky, then clearly something is probably wrong with the dummy (Since you're sure about the order ID and such). |
| 09-14-2006, 07:21 PM | #5 |
I set the level manually to 2, and I verified with BJDebugMsg before I posted that it was making it into the function. My guess would be like you said, that it's the units backswing. Maybe the unit is being removed too soon. I'll post later to let you know. |
| 09-15-2006, 03:59 AM | #6 |
I've eliminated any possibility of it being a problem with the dummy unit. I tried creating another Deadlord to cast the spell and never removed it. I filled the trigger with BJDebugMsg to check what is working. It looks as if this line is the problem call IssuePointOrderByIdLoc(u,1096116590,l) I tried changing it to call IssuePointOrderLoc(u,"inferno",l) but still nothing. I've never had problems with dummy units up to this point. |
| 09-15-2006, 04:06 AM | #7 |
Have you tried ordering the unit by coords instead of locations? Like, GetLocationX(l)/GetLocationY(l). Might be a long shot, but I can't see anyother reason it wouldnt work unless you still have it as a hero ability or something. I guarantee you, 'call IssuePointOrder(u, "inferno", x, y)' will work if the dummy unit is 100%. |
| 09-15-2006, 04:28 AM | #8 |
Must be something weird with inferno. Download this test map I made with that trigger. You'll see that it doesn't work. I tried creating another dreadlord. Btw, the unit in my map is Vexorian's caster unit. |
| 09-15-2006, 07:23 AM | #9 |
It's not going to help you. Back 2 years ago I was trying to create a frozen circle using inferno, letting the dummy cast it. You simply cannot order a dummy to cast inferno on a location, as weird as it sounds, as hard as i tried, it didnt work. If you find a solution, i'd be glad to see it. |
| 09-15-2006, 08:34 AM | #10 |
Awake, you should have just messaged me on aim. I didn't realize you were having probs with this. The order id you want is 852224. This is what I used to verify this order id. Hope this helps. JASS:function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing call BJDebugMsg(I2S(GetIssuedOrderId())) endfunction //=========================================================================== function InitTrig_Untitled_Trigger_001 takes nothing returns nothing set gg_trg_Untitled_Trigger_001 = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Untitled_Trigger_001, EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER ) call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions ) endfunction |
| 09-15-2006, 09:24 AM | #11 |
The problem you have is very simple. The OrderID is "dreadlordinferno" not "inferno" |
| 09-15-2006, 11:45 AM | #12 |
*Snickerfit* Figures. Follow PIV's advice and try -- JASS:call IssuePointOrder(u, "dreadlordinferno", x, y) |
| 09-15-2006, 11:49 AM | #13 |
O_o, interesting. |
| 09-15-2006, 12:15 PM | #14 |
Yes, if u cant call this kind of stuffs, the orderids may be wrong, use the GUI and check. Create a GUI fucntion of the spell u wanna cast and error the script. Check the order id in the error spoted window that pops up when u try to save |
| 09-15-2006, 03:01 PM | #15 |
The inferno order id is 852232 not 1096116590 |
