• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Help (Displayable Countdown timer) (preferably in JASS)

Status
Not open for further replies.
Level 3
Joined
Sep 5, 2004
Messages
32
Can anybody help or teach me how to make a displayable countdown timer for bombs or anything? I can make one, but the countdown gets messed up whenever i put up the second bomb with the timer. Please anyone...
 
Level 3
Joined
Sep 5, 2004
Messages
32
I know JASS (see my blink strike spell)

I know JASS, it is the loops problem, the memory is not leaking as both things happen at the same time, (what i am talking about is the messed up time show, try making one and you will see what i mean) This is what i did

function Trig_Poison_Bomb_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'oeye' ) ) then
return false
endif
return true
endfunction

function Trig_Poison_Bomb_Actions takes nothing returns nothing
set udg_i = 60
loop
exitwhen ( udg_i == 0 ) or (IsUnitDeadBJ(GetTriggerUnit()) == true )
set udg_i = udg_i - 1
call DestroyTextTagBJ( udg_Timers[GetUnitUserData(GetTriggerUnit())] )
call CreateTextTagLocBJ( I2S(( udg_i )), OffsetLocation(GetUnitLoc(GetTriggerUnit()), -32.00, 0), 32.00, 10, 100, 100, 100, 0 )
set udg_Timers[GetUnitUserData(GetTriggerUnit())] = GetLastCreatedTextTag()
call TriggerSleepAction( 1.00 )

endloop
call DestroyTextTagBJ( udg_Timers[GetUnitUserData(GetTriggerUnit())] )
call CreateNUnitsAtLoc( 1, 'hfoo', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
call UnitApplyTimedLifeBJ( 300.00, 'BTLF', GetLastCreatedUnit() )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "deathanddecay", GetUnitLoc(GetTriggerUnit()) )
call ExplodeUnitBJ( GetTriggerUnit() )

endfunction

//===========================================================================
function InitTrig_Poison_Bomb takes nothing returns nothing
set gg_trg_Poison_Bomb = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Poison_Bomb, GetPlayableMapRect() )
call TriggerAddCondition( gg_trg_Poison_Bomb, Condition( function Trig_Poison_Bomb_Conditions ) )
call TriggerAddAction( gg_trg_Poison_Bomb, function Trig_Poison_Bomb_Actions )
endfunction
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
Don't you take me with texts like "I know JASS" when I can obviously see that what you've done here was just a conversion from GUI to JASS. You even left the globals (and so, you practically didn't change a thing int he script). I really suggest you have a look into my tutorial since what you used were globals, and with globals you obviously can't obtain multi-instanceability. And if you know JASS but you simply didn't use locals, then you really can't make efficient JASS. Learn to use locals!

~Daelin
 
Level 3
Joined
Sep 5, 2004
Messages
32
yeah please, i cant understand Many Vex spells cause i dont know handlers. It would be a very gd and fine addition to the JASS tutorial. Thanx
 
Status
Not open for further replies.
Top