Floating txt problem

ultimate11

Active Member
Reaction score
25
Trigger:
  • Creep Bounty
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to False
      • Or - Any (Conditions) are true
        • Conditions
          • (Owner of (Triggering unit)) Equal to Player 11 (Dark Green)
          • (Owner of (Triggering unit)) Equal to Player 12 (Brown)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Unit-type of (Triggering unit)) Equal to Creep[1]
              • (Unit-type of (Triggering unit)) Equal to Creep[2]
        • Then - Actions
          • Set Gold = (Random integer number between 45 and 55)
          • Player - Add Gold to (Owner of (Killing unit)) Current gold
          • Floating Text - Create floating text that reads (|CFFFFFF01+ + ((String(Gold)) + |R)) above (Triggering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.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 (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
          • Floating Text - Hide (Last created floating text) for (All players)
          • Floating Text - Change the fading age of (Last created floating text) to 2.00 seconds
          • Floating Text - Show (Last created floating text) for (Player group((Owner of (Killing unit))))
        • Else - Actions

oky this work fine except one thing.I want to show last created floating txt only to owner of kiling unit but it`s show to all players. :(
 
i think you can limit the floating text only through JASS, not sure though

EDIT: correction, there is a "show/hide" command
 
that show/hide command work only on players group as i know so far.So anyone have another ideea?
 
Trigger:
  • Floating Text - Show (Last created floating text) for (Player group((Player 1 (Red))))
 
Trigger:
  • Floating Text - Show (Last created floating text) for (Player group((Player 1 (Red))))

Trigger:
  • Floating Text - Show (Last created floating text) for (Player group((Owner of (Killing unit))))


Was in the original trigger... :rolleyes:
 
Use this function at start:
Trigger:
  • Custom script: if GetLocalPlayer() != GetOwningPlayer(GetKillingUnit()) then

And
Trigger:
  • Custom script: endif

At end
 
solved,it work with this
Trigger:
  • Floating Text - Hide (Last created floating text) for (All players matching ((Owner of (Killing unit)) Not equal to (Matching player)))
 
Why don't you just hide it for (All players) and show it for (Player group((Owner of (Killing unit)))) ?
No leaks ;)
(Well one... XD)
 
honestlly i tried by first time but amazing don`t work at all.Crazy it`s show for all ppl even enemy ones.
 
Here the full code (example);

Trigger:
  • Floating Text Example
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Custom script: if GetLocalPlayer() == GetOwningPlayer( GetKillingUnit() ) then
      • Set Point1 = (Position of (Triggering unit))
      • Floating Text - Create floating text that reads Hello at Point1 with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
      • Floating Text - Change the fading age of (Last created floating text) to 0.60 seconds
      • Floating Text - Set the velocity of (Last created floating text) to 20.00 towards 90.00 degrees
      • Custom script: call RemoveLocation (udg_Point1)
      • Custom script: endif


This function
Trigger:
  • Custom script: if GetLocalPlayer() == GetOwningPlayer( GetKillingUnit() ) then

mean only effect (Owner of killing unit) and will not effect others which means other can't see floating text.

Use == to show floating text to that player and use != to show to all players except that one.

For more information; http://www.thehelper.net/forums/showthread.php?t=89207

Edit: Apologize for first code, I have made some mistake ( It should be == instead of != )
 
it will be most easy for me if i know Jass but seem to be so hard learning it.BTW why doesn`t this good
Trigger:
  • Floating Text - Hide (Last created floating text) for (All players matching ((Owner of (Killing unit)) Not equal to (Matching player)))

leak?
it works this way :D
 
@ Bankde: That will never works actually (Online at least) as it will desync because you're creating a handle (Floating Text) for one playr only, and that will not work...

@ ultimate11: Yes, that leaks but it can be fixed:

Trigger:
  • Set Temp_Force = (All player matching ((Ower of (Killing unit)) Not equal to (Matching player))
    • Floating Text - Hide (Last created floating text) for Temp_Force
    • Custom script: call DestroyForce( udg_Temp_Force )


Note: Freehanded ! And also, the variable "Temp_Force" is of the type "Player Group" ;)
 
so in conclusion, we should make a text, hide it for everyone then show it to the player we need it to be shown?
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    It is weird seeing a way more realistic users online number
  • The Helper The Helper:
    Happy Tuesday Night!
    +1
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:

      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