• 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.

[JASS] Floating texte,spell

Status
Not open for further replies.
Level 10
Joined
Feb 20, 2008
Messages
448
ok first i know there a way to do text wrap but idk how could some1 help me ?
is there another way xcept print screen

and my real kestion is my friend made me a spell jass, but its uncomplete and he really busy could some1 could just replace variable, i can set the raw code of spell and making it i just barely understand what to put on variable

JASS:
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope SpellDmgDetect initializer Init
    globals
//CONFIG HEADER                     //Below=Example
        private constant integer ABID = 'AOsh'//REPLACE THIS TEXT WITH YOUR ABILITIES RAW CODE. EG. 'A000' OR 'A001'
        private constant real LIFE = 5//REPLACE THIS TEXT WITH HOW LONG YOU WANT THE TEXTTAG TO LAST FOR
//END CONFIG HEADER            //Above=Example
    endglobals

    private function FailSafe takes nothing returns boolean
        return true
    endfunction
    private function DmgShow takes nothing returns nothing
        local unit u = GetTriggerUnit()
        local location l = GetUnitLoc(u)
        local real dmg = GetEventDamage()
        local texttag tt = CreateTextTagLocBJ(I2S(R2I(dmg)),l,0,12,255,255,255,100)
        call SetTextTagLifespan(tt, LIFE)
        call RemoveLocation(l)
        set l = null
        set u = null
        call DestroyTrigger(GetTriggeringTrigger())
    endfunction
    private function SplDctC takes nothing returns boolean
        return GetSpellAbilityId() == ABID
    endfunction
    private function SplDctA takes nothing returns nothing
        local unit u = GetSpellTargetUnit()
        local trigger t = CreateTrigger()
        call TriggerAddAction(t,function DmgShow)
        call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_DAMAGED)
        set u = null
    endfunction
    private function Init takes nothing returns nothing
        local trigger t = CreateTrigger()
        local integer i = 0
        loop
        exitwhen i > 15
            call TriggerRegisterPlayerUnitEvent(t,Player(i),EVENT_PLAYER_UNIT_SPELL_EFFECT,Condition(function FailSafe))
            set i = i+1
        endloop
        call TriggerAddAction(t, function SplDctA)
        call TriggerAddCondition(t, Condition(function SplDctC))
    endfunction
endscope
srry for no text wrap i dont know how to do :/
 
Last edited:
Level 6
Joined
Sep 4, 2007
Messages
157
JASS:
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope SpellDmgDetect initializer Init
globals
//CONFIG HEADER //Below=Example
private constant integer ABID = 'AOsh'//REPLACE THIS TEXT WITH YOUR ABILITIES RAW CODE. EG. 'A000' OR 'A001'
private constant real LIFE = 5//REPLACE THIS TEXT WITH HOW LONG YOU WANT THE TEXTTAG TO LAST FOR
//END CONFIG HEADER //Above=Example
endglobals

private function FailSafe takes nothing returns boolean
return true
endfunction
private function DmgShow takes nothing returns nothing
local unit u = GetTriggerUnit()
local location l = GetUnitLoc(u)
local real dmg = GetEventDamage()
local texttag tt = CreateTextTagLocBJ(I2S(R2I(dmg)),l,0,12,255,255,255,100)
call SetTextTagLifespan(tt, LIFE)
call RemoveLocation(l)
set l = null
set u = null
call DestroyTrigger(GetTriggeringTrigger())
endfunction
private function SplDctC takes nothing returns boolean
return GetSpellAbilityId() == ABID
endfunction
private function SplDctA takes nothing returns nothing
local unit u = GetSpellTargetUnit()
local trigger t = CreateTrigger()
call TriggerAddAction(t,function DmgShow)
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_DAMAGED)
set u = null
endfunction
private function Init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer i = 0
loop
exitwhen i > 15
call TriggerRegisterPlayerUnitEvent(t,Player(i),EVENT_PLAYER_UNIT_SPELL_EFFECT,Condition(function FailSafe))
set i = i+1
endloop
call TriggerAddAction(t, function SplDctA)
call TriggerAddCondition(t, Condition(function SplDctC))
endfunction
endscope

i dont see what you want from this i get no errors from this code
 
Level 10
Joined
Feb 20, 2008
Messages
448
some how when i turn this program on its said, expected a code statement, expected end of line, expected a name, expected a variable name, expected 'end loop' expected a function name!!! i did something wrong cuz its said the trigger got 59 error :/

i dont know jass alot , so the error dont say anything to me!!! i probly forgot to change something some1 can help me ?

JASS:
function Trig_Untitled_Trigger_002_Actions takes nothing returns nothing
//TESH.scrollpos=0
//TESH.alwaysfold=0
scope SpellDmgDetect initializer Init
globals
//CONFIG HEADER //Below=Example
private constant integer ABID = 'A007' OR 'A042' OR 'A00M' OR 'A032' OR 'A016' OR 'A02O' OR 'A00N' OR 'A008' OR 'A049' OR 'A01D' OR 'A01Y' OR 'A00J' OR 'A03C' OR 'A041' OR 'A01E'
private constant real LIFE = 5
//END CONFIG HEADER //Above=Example
endglobals

private function FailSafe takes nothing returns boolean
return true
endfunction
private function DmgShow takes nothing returns nothing
local unit u = GetTriggerUnit()
local location l = GetUnitLoc(u)
local real dmg = GetEventDamage()
local texttag tt = CreateTextTagLocBJ(I2S(R2I(dmg)),l,0,12,255,255,255,100)
call SetTextTagLifespan(tt, LIFE)
call RemoveLocation(l)
set l = null
set u = null
call DestroyTrigger(GetTriggeringTrigger())
endfunction
private function SplDctC takes nothing returns boolean
return GetSpellAbilityId() == ABID
endfunction
private function SplDctA takes nothing returns nothing
local unit u = GetSpellTargetUnit()
local trigger t = CreateTrigger()
call TriggerAddAction(t,function DmgShow)
call TriggerRegisterUnitEvent(t,u,EVENT_UNIT_DAMAGED)
set u = null
endfunction
private function Init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer i = 0
loop
exitwhen i > 15
call TriggerRegisterPlayerUnitEvent(t,Player(i),EVENT_PLAYER_UNIT_SPELL_EFFECT,Condition(function FailSafe))
set i = i+1
endloop
call TriggerAddAction(t, function SplDctA)
call TriggerAddCondition(t, Condition(function SplDctC))
endfunction
endscope
endfunction

//===========================================================================
function InitTrig_Untitled_Trigger_002 takes nothing returns nothing
    set gg_trg_Untitled_Trigger_002 = CreateTrigger(  )
    call TriggerAddAction( gg_trg_Untitled_Trigger_002, function Trig_Untitled_Trigger_002_Actions )
endfunction
 
Last edited:
Status
Not open for further replies.
Top