• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Meepo War

Status
Not open for further replies.
Level 19
Joined
Oct 15, 2008
Messages
3,231
It doesn't look too bad at the moment, I saw it in epicwar before you posted this, by the way.
Hmm... Do make a revival of hero with time you'll need a trigger which checks every 0.1 seconds for a hero to die, then uses an equation (Whichever you choose) in order to set the revive time of the hero.
About the bug thing, I don't really understand.
Neutral spawns can be made with triggers, set every few seconds to create the neutral units at the location, however, I'm not sure on how to do the fog spawn and randomed spawn thing, sorry.
Looks promising though, wish you all the best on your map:)
 
Level 8
Joined
Jul 3, 2011
Messages
251
JASS:
 function GetDelay takes nothing returns real
    return 30.00
endfunction

function Trig_MUI_Revive_Conditions takes nothing returns boolean
    return IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true
endfunction

function Loop takes nothing returns nothing
    local timer t = GetExpiredTimer()
    local integer id = GetHandleId(t)
    local real x = LoadReal(udg_Hash, id, 1)
    local real y = LoadReal(udg_Hash, id, 2)
    local unit u = LoadUnitHandle(udg_Hash, id, 3)
    call ReviveHero(u, x, y, true)
    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 PauseTimer(t)
    call DestroyTimer(t)
    call FlushChildHashtable(udg_Hash, id)
    set u = null
    set t = null
endfunction

function Trig_MUI_Revive_Actions takes nothing returns nothing
    local timer t = CreateTimer()
    local integer id = GetHandleId(t)
    local unit u = GetTriggerUnit()
    local real x = GetUnitX(u)
    local real y = GetUnitY(u)
    call SaveReal(udg_Hash, id, 1, x)
    call SaveReal(udg_Hash, id, 2, y)
    call SaveUnitHandle(udg_Hash, id, 3, u)
    call TimerStart(t, GetDelay, false, function Loop)
    set u = null
    set t = null
endfunction

function InitTrig_MUI_Revive takes nothing returns nothing
    local trigger t = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_DEATH )
    call TriggerAddCondition( t, Condition( function Trig_MUI_Revive_Conditions ) )
    call TriggerAddAction( t, function Trig_MUI_Revive_Actions )
    set udg_Hash = InitHashtable()
    set t = null
endfunction

^Revival Timer
 
Level 8
Joined
Jul 3, 2011
Messages
251
I might review later, is there anything else you need help with?

If by YM you mean Yahoo Messenger i dont have it, but i have hotmail which i could give you if you private msg me :ogre_hurrhurr:
 
Status
Not open for further replies.
Top