script change name?

Troll

New Member
Reaction score
4
JASS:
function Trig_Revival_Conditions takes nothing returns boolean
    return IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == true 
endfunction

function Trig_Revival_Cond2 takes timer t returns boolean
    return ( TimerGetRemaining(t) <= 0.50 )
endfunction

function Trig_Revival_Actions takes nothing returns nothing
    local unit u = GetDyingUnit()
    local player p = GetOwningPlayer(u)
    local real time = 5.00
    local timer t = CreateTimer()
    local timerdialog td 
    local rect array SpawnRegion
    set SpawnRegion[1] = gg_rct_SpawnRegion1
    set SpawnRegion[2] = gg_rct_SpawnRegion2
    set SpawnRegion[3] = gg_rct_SpawnRegion3
    set SpawnRegion[4] = gg_rct_SpawnRegion4
    set SpawnRegion[5] = gg_rct_SpawnRegion5
    set SpawnRegion[6] = gg_rct_SpawnRegion6
    set SpawnRegion[7] = gg_rct_SpawnRegion8
    set SpawnRegion[8] = gg_rct_SpawnRegion8
    set SpawnRegion[9] = gg_rct_SpawnRegion9
    set SpawnRegion[10] = gg_rct_SpawnRegion10
    set SpawnRegion[11] = gg_rct_SpawnRegion11
    set SpawnRegion[12] = gg_rct_SpawnRegion12
    call StartTimerBJ( t, false, ( time * I2R(GetUnitLevel(u)) ) )
    set t = GetLastCreatedTimerBJ()
    set td = CreateTimerDialog(t)
    call TimerDialogDisplayBJ(false, td)
    call TimerDialogDisplayForPlayerBJ(true, td, GetOwningPlayer(u))
    loop
        exitwhen ( Trig_Revival_Cond2(t) )
        call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL, 0.50))
    endloop
    call TimerDialogDisplayForPlayerBJ(false, td, GetOwningPlayer(u))
    call DestroyTimerDialog( td )
    call ReviveHeroLoc( u, GetRectCenter(SpawnRegion[GetConvertedPlayerId(GetOwningPlayer(u))]), true )
    call PanCameraToTimedLocForPlayer( p, GetRectCenter(SpawnRegion[GetConvertedPlayerId(GetOwningPlayer(u))]), 0.00 )
    call SelectUnitForPlayerSingle( u, p )
    call DestroyTimer( t )
    set u = null
    set p = null
    set t = null
    set td = null
endfunction

//===========================================================================
function InitTrig_init_15 takes nothing returns nothing
    local trigger gg_trg_init_15 = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ(gg_trg_init_15, EVENT_PLAYER_UNIT_DEATH)
    call TriggerAddCondition( gg_trg_init_15, Condition( function Trig_Revival_Conditions ) )
    call TriggerAddAction( gg_trg_init_15, function Trig_Revival_Actions )
endfunction


this is a revive timer, the timer is called Remaining, in game, but when i change the timer name here, "Remaining" i get errors , tons of errors why? i want the timer name to be "Revive in:" and i also want the heroi gets hes mana FULL after revive, this was made by my friend called "Charapanga" in this forum. but he went offline so i couldn ask him!
 

Exide

I am amazingly focused right now!
Reaction score
448
First of all, when posting JASS triggers; use the JASS-tags.

Which name are you trying to change exactly?
-When you change name of one thing, you must change it everywhere in the trigger. -Else the trigger won't know what "you are talking about".
 

Troll

New Member
Reaction score
4
I am triying to change name of the timer from "Remaning" to "Reviven in:"
and also revive the hero with full mana
 

Naga'sShadow

Ultra Cool Member
Reaction score
49
Maybe I'm just blind but i can't see where you would have placed the string remaining in at all. Is that the default setting of a timer? If that's the case then you have to use a different command to crate the timer window. Do you have newgen or jasscraft? With either one you can look up a function, in this case TimerDialogDisplayBJ and TimerDialogDisplayForPlayerBJ, BJ tags mean the function is made up of native functions. If you can look at that you can find the one that takes the timer dialog name. Then just use the native that works for you. If you ask a mod to move this to the Jass thread you'll likely get a better response.
 

Exide

I am amazingly focused right now!
Reaction score
448
In this code you never specify any name for the Timer.
Add this line, after creating the timer:

JASS:

    call TimerDialogSetTitle( t, "Revive in: " )
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top