Beetlebomb
New Member
- Reaction score
- 43
Nope, that didn't seem to help it. However, I'll still keep the InitTrig part in there as a precaution. Thank you
Anyone else have any idea? Emjlr3? ^^
Anyone else have any idea? Emjlr3? ^^
... You don't know the name of your trigger?.... The name on the left side of the editor , that you defined ( or didn't , if not it should be Untitled_trigger_###) , by the little white paper icon.
Edit: Is there another alternative I could take so I wouldn't have to bother with naming this preset unit? It seems like this is taking way more time then it should.
scope Bwahaha initializer InitializingFunc
private function LolPoop takes nothing returns boolean
return true
endfunction
private function ConditionsNot takes nothing returns nothing
//Do stuff!
endfunction
private function InitializingFunc takes nothing returns nothing
//Making a function private lets you have multiple functions with the same name
local trigger t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(t,function LolPoop)
call TriggerAddAction(t,function ConditionsNOT)
endfunction
endscope
function Heal takes nothing returns nothing
local unit u = gg_unit_H000_0000
call SetUnitState(u, UNIT_STATE_LIFE, GetUnitState(u, UNIT_STATE_MAX_LIFE))
call SetUnitState(u, UNIT_STATE_MANA, GetUnitState(u, UNIT_STATE_MAX_MANA))
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl", GetUnitX(u), GetUnitY(u)))
set u = null
endfunction
//===========================================================================
function Restore_Health takes nothing returns nothing
local trigger Restore = CreateTrigger()
call TriggerRegisterPlayerEventEndCinematic( Restore, Player(0) )
call TriggerAddAction( Restore, function Heal )
endfunction
function Trig_Restore_Actions takes nothing returns nothing
local unit u = gg_unit_H000_0000
call SetUnitState(u, UNIT_STATE_LIFE, GetUnitState(u, UNIT_STATE_MAX_LIFE))
call SetUnitState(u, UNIT_STATE_MANA, GetUnitState(u, UNIT_STATE_MAX_MANA))
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl", GetUnitX(u), GetUnitY(u)))
set u = null
endfunction
//===========================================================================
function InitTrig_Restore takes nothing returns nothing
set gg_trg_Restore = CreateTrigger()
call TriggerRegisterPlayerEventEndCinematic( gg_trg_Restore, Player(0) )
call TriggerAddAction( gg_trg_Restore, function Heal )
endfunction
function Trig_Restore_Actions takes nothing returns nothing
local unit u = gg_unit_H000_0000
call SetUnitState(u, UNIT_STATE_LIFE, GetUnitState(u, UNIT_STATE_MAX_LIFE))
call SetUnitState(u, UNIT_STATE_MANA, GetUnitState(u, UNIT_STATE_MAX_MANA))
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl", GetUnitX(u), GetUnitY(u)))
set u = null
endfunction
//===========================================================================
function InitTrig_Restore takes nothing returns nothing
set gg_trg_Restore = CreateTrigger()
call TriggerRegisterPlayerEventEndCinematic( gg_trg_Restore, Player(0) )
call TriggerAddAction( gg_trg_Restore, function Heal )
endfunction
function InitTrig_Restore takes nothing returns nothing
set gg_trg_Restore = CreateTrigger()
call TriggerRegisterPlayerEventEndCinematic( gg_trg_Restore, Player(0) )
call TriggerAddAction( gg_trg_Restore, function Trig_Restore_Actions )
endfunction