jass help

uberfoop

~=Admiral Stukov=~
Reaction score
177
OK, i dont know jass. But I am starting to get into more multi-instanceable stuff, so im needing to use locals. How would I local floating text? I need to know:
-what the script is for localing floatin text
-what i write for 'last created floating text' in my custom script.

so that i can do 'local variabletype variablename= getlastwhatevertheheck'
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,494
Some example maybe:
Code:
Floating Text
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
    Actions
        Floating Text - Create floating text that reads (Name of (Ability being cast)) above (Casting unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 100.00%), and 0.00% transparency
        Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
        Floating Text - Change the fading age of (Last created floating text) to 2.00 seconds
        Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
        Floating Text - Change (Last created floating text): Disable permanence

In natives only, this might look like this:
Code:
function Trig_Floating_Text_Actions takes nothing returns nothing
    set bj_lastCreatedTextTag = CreateTextTag()
    call SetTextTagText(bj_lastCreatedTextTag, GetAbilityName(GetSpellAbilityId()), 0.023)
    call SetTextTagPosUnit(bj_lastCreatedTextTag, GetSpellAbilityUnit(), 0)
    call SetTextTagColor(bj_lastCreatedTextTag, 255, 0, 255, 255)
    call SetTextTagVelocity(bj_lastCreatedTextTag, 0, 0.036)
    call SetTextTagFadepoint(bj_lastCreatedTextTag, 2)
    call SetTextTagLifespan(bj_lastCreatedTextTag, 3)
    call SetTextTagPermanent(bj_lastCreatedTextTag, false)
endfunction

//===========================================================================
function InitTrig_Floating_Text takes nothing returns nothing
    set gg_trg_Floating_Text = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Floating_Text, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddAction( gg_trg_Floating_Text, function Trig_Floating_Text_Actions )
endfunction


"bj_lastCreatedTextTag" is of type "texttag".
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top