trb92
Throwing science at the wall to see what sticks
- Reaction score
- 142
Not sure if I should have posted this in the NewGen thread or made my own, so if I did the wrong decision I'm sorry.
On to my question.
Is there any logical reason that a trigger should crash when the test map button is used, but not when warcraft is opened and the map is manually found? This is the trigger.
This works fine if I open the map in warcraft and run it, or if I copy the trigger and units over to the normal WE, yet it crashes if testing in NewGen. This is quite annoying as most of my other triggers require NewGen to work, and it's inconvenient to open warcraft every time I want to test my map.
On to my question.
Is there any logical reason that a trigger should crash when the test map button is used, but not when warcraft is opened and the map is manually found? This is the trigger.
JASS:
function Trig_Hero_Info_Actions takes nothing returns nothing
if (GetTriggerUnit() == gg_unit_N000_0006) then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,3,"Fire Mage")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,3,"The Fire Mage is an |cff0000ffintelligence|r based hero")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,3,"The Fire Mage039;s abilities are: ")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,3,"Fire Nova: The mage channels fire energy through his body, then blasts it out around him. Deals |cff0000ff(2/3/4)x Intelligence|r damage. Warning: This ability harms allies.")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,3,"Flame Rush: The mage sets himself on fire and charges the target, burning all units he passes along the way. Burn damage is |cff0000ff(1/1.5/2)x Intelligence|r.")
return
endif
if (GetTriggerUnit() == gg_unit_H000_0023) then
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,3,"Paladin")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,3,"The Paladin is an |cffff0000Strength|r based hero")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,3,"The Paladin039;s abilities are: ")
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,3,"Holy Shield: Creates holy spirits that float around you, damaging anything they hit. Spirit collision damage is |cffff0000(0.5/1.0/1.5)x Strength|r.")
return
endif
endfunction
//===========================================================================
function InitTrig_Hero_Info takes nothing returns nothing
local integer i = 0
set gg_trg_Hero_Info = CreateTrigger( )
loop
exitwhen i>12
call TriggerRegisterPlayerUnitEvent(gg_trg_Hero_Info, Player(i), EVENT_PLAYER_UNIT_SELECTED, null)
set i = i + 1
endloop
call TriggerAddAction( gg_trg_Hero_Info, function Trig_Hero_Info_Actions )
endfunction
This works fine if I open the map in warcraft and run it, or if I copy the trigger and units over to the normal WE, yet it crashes if testing in NewGen. This is quite annoying as most of my other triggers require NewGen to work, and it's inconvenient to open warcraft every time I want to test my map.