Help me find the problem, please.

trb92

Throwing science at the wall to see what sticks
Reaction score
142
I made this trigger, which should show the damage dealt in a floating text, but it doesn't. However, the BJDebugMsg shows the correct damage, so I can't find a problem. Could one of the better JASS people here help me out?

JASS:
function ShowDamage_Actions takes nothing returns nothing
    local texttag t = CreateTextTag()
    local real angle = GetUnitFacing(GetEventDamageSource())
    call SetTextTagText(t,R2S(GetEventDamage()),10)
    call SetTextTagPosUnit(t,GetEventDamageSource(),0)
    call SetTextTagColor(t,100,0,0,0)
    call SetTextTagVelocityBJ( t, angle + 180., 90 )
    call SetTextTagLifespan(t,3.)
    call SetTextTagFadepoint(t,2.)
    call SetTextTagVisibility(t,true)
    call BJDebugMsg("Damage Dealt: "+R2S(GetEventDamage()))
endfunction

//===========================================================================
function InitTrig_Show_Damage takes nothing returns nothing
    set gg_trg_Show_Damage = CreateTrigger()
    call TriggerAddAction(gg_trg_Show_Damage, function ShowDamage_Actions)
endfunction
 

Trollvottel

never aging title
Reaction score
262
call SetTextTagText(t,R2S(GetEventDamage()),10)

should be


call SetTextTagText(t,R2S(GetEventDamage()),0.04)
 

trb92

Throwing science at the wall to see what sticks
Reaction score
142
And now it works... But I thought that 10 there was the font size, or is that only in the BJ version?
 

trb92

Throwing science at the wall to see what sticks
Reaction score
142
size * 0.023 / 10

Yeah, the BJ does that calculation... That would explain why mine didn't work, 10 would be absolutely massive(4347.8 to be precise) and wouldn't show up on the screen. Thanks Trollvottel.
 
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