- Joined
- Feb 27, 2007
- Messages
- 5,578
I'm super perplexed by this. Trying to get some buildings to rotate upon creation I wrote this trigger which works:
But if I just sneak the
Edit: If I convert "init broken" to JASS without so much as touching the actual trigger contents it works just fine. This appears to be some sort of bizarre GUI bug. I am running 1.29, not 1.30.
-
init working
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
Custom script: call BJDebugMsg("1")
-
Custom script: call UnitRemoveAbility(gg_unit_hbar_0051, 'Amov')
-
Custom script: call BJDebugMsg("2")
-
Unit - Make Barracks 0051 <gen> face 90.00 over 0.00 seconds
-
Custom script: call BJDebugMsg("3")
-
Unit - Kill Archmage 0000 <gen>
-
Custom script: call BJDebugMsg("4")
-
-
JASS:
function Trig_init_Actions takes nothing returns nothing
call BJDebugMsg("1")
call UnitRemoveAbility(gg_unit_hbar_0051, 'Amov')
call BJDebugMsg("2")
call SetUnitFacingTimed( gg_unit_hbar_0051, 90.00, 0.00 )
call BJDebugMsg("3")
call KillUnit( gg_unit_Hamg_0000 )
call BJDebugMsg("4")
endfunction
//===========================================================================
function InitTrig_init takes nothing returns nothing
set gg_trg_init = CreateTrigger( )
call TriggerAddAction( gg_trg_init, function Trig_init_Actions )
endfunction
call SetUnitFacingTimed( gg_unit_hbar_0051, 90.00, 0.00 )
into the first trigger as a CS line instead of the GUI action, then things get real funky. I still see all 1 2 3 4 messages and the Archmage dies... but the unit's Move ability doesn't get removed and it doesn't change its facing. I presume the latter is a result of the former for the turning unit. Regardless, why the fuck would the UnitRemoveAbility() stop working once I replace a GUI line below that line with a literally identical Custom Script line? Trigger that doesn't work is below and a test map is attached so you can see for yourself:-
init broken
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
Custom script: call BJDebugMsg("1")
-
Custom script: call UnitRemoveAbility(gg_unit_hbar_0051, 'Amov')
-
Custom script: call BJDebugMsg("2")
-
Custom script: call SetUnitFacingTimed( gg_unit_hbar_0051, 90.00, 0.00 )
-
Custom script: call BJDebugMsg("3")
-
Unit - Kill Archmage 0000 <gen>
-
Custom script: call BJDebugMsg("4")
-
-
Edit: If I convert "init broken" to JASS without so much as touching the actual trigger contents it works just fine. This appears to be some sort of bizarre GUI bug. I am running 1.29, not 1.30.