I'm getting an odd error when I use this trigger, I don't know why.
Edit: Script Code
//-------------------------------------------------------------------------------------------------- // Trigger: Unit comes close to airport //-------------------------------------------------------------------------------------------------- bool gt_Unitcomesclosetoairport_Func (bool testConds, bool runActions) { // Actions if (!runActions) { return true; }
This is really embarrassing, i forgot I hid a unit belonging to the neutral player under a structure and it was trying to access it's dialog, but i never declared a dialog for that player.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I'm getting an odd error when I use this trigger, I don't know why.
Edit: Script Code
//--------------------------------------------------------------------------------------------------
// Trigger: Unit comes close to airport
//--------------------------------------------------------------------------------------------------
bool gt_Unitcomesclosetoairport_Func (bool testConds, bool runActions) {
// Actions
if (!runActions) {
return true;
}
DialogControlSetVisible(gv_purchase, PlayerGroupSingle(UnitGetOwner(EventUnit())), true);
return true;
}
//--------------------------------------------------------------------------------------------------
void gt_Unitcomesclosetoairport_Init () {
gt_Unitcomesclosetoairport = TriggerCreate("gt_Unitcomesclosetoairport_Func");
TriggerAddEventUnitRangePoint(gt_Unitcomesclosetoairport, null, UnitGetPosition(UnitFromId(1931736278)), 2.0, true);
}
This is really embarrassing, i forgot I hid a unit belonging to the neutral player under a structure and it was trying to access it's dialog, but i never declared a dialog for that player.