• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

[Trigger] Floating Text Problem

Status
Not open for further replies.
Level 15
Joined
Oct 18, 2008
Messages
1,588
Hi there
EDIT: I'll put it simple:
  • Custom script: if GetLocalPlayer() = GetTriggerPlayer() then
  • Change Text *Floating Text* to *something*
  • Custom script: endif
==DESYNC?
And will it work correctly? Or is there any other way around it(without generating more than 100 Floating Texts)?
 
Last edited:
Level 5
Joined
Aug 16, 2010
Messages
114
limit the trigger according to the event... add a variable:
set "bla" = last created floating text
then make condition:
(if "bla" = last created floating text) then (do nothing)
that way the trigger will make 1 text, and if it tries to repeat, it cant because the text is limited by the condition... in other words... we set the trigger to a variable, and later check if it is present, since it is, we dont allow the trigger to generate another txt
 
Level 26
Joined
Mar 19, 2008
Messages
3,140
You can always use empty string method to prevent from desync.
JASS:
function Test takes nothing returns nothing
    local player p = GetTriggerPlayer()
    local string s = "floating text string value"
    if GetLocalPlayer() != p then
        set s = ""
    endif
    // Here create floating text
    set p = null
endfunction
 
Status
Not open for further replies.
Top