• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Does My Trigger Have Leaks?

Status
Not open for further replies.
Level 2
Joined
May 13, 2017
Messages
21
Hi guys I would like to ask if this trigger do have an existing leaks. Thank Youu~

  • Texts
    • Events
    • Conditions
    • Actions
      • Set temp_point_1 = (Center of Shipyard <gen>)
      • Floating Text - Create floating text that reads Shipyard at temp_point_1 with Z offset 0.00, using font size 15.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Set temp_point_2 = (Position of Circle of Power 0034 <gen>)
      • Floating Text - Create floating text that reads Seven Cross Keep at temp_point_2 with Z offset 0.00, using font size 20.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Set temp_point_3 = (Position of Circle (MM.1) 0074 <gen>)
      • Floating Text - Create floating text that reads Fedner at temp_point_3 with Z offset 0.00, using font size 13.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Set temp_point_4 = (Position of Circle (MM.1) 0068 <gen>)
      • Floating Text - Create floating text that reads Mucklough at temp_point_4 with Z offset 0.00, using font size 13.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Set temp_point_5 = (Position of Circle (MM.1) 0009 <gen>)
      • Floating Text - Create floating text that reads Mebsuta Forest at temp_point_5 with Z offset 0.00, using font size 13.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Set temp_point_6 = (Position of Circle of Power 0007 <gen>)
      • Floating Text - Create floating text that reads Barn at temp_point_6 with Z offset 0.00, using font size 15.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Set temp_point_7 = (Position of Circle of Power 0003 <gen>)
      • Floating Text - Create floating text that reads Church at temp_point_7 with Z offset 0.00, using font size 18.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Set temp_point_8 = (Position of Circle (MM.1) 0130 <gen>)
      • Floating Text - Create floating text that reads Forest Lake at temp_point_8 with Z offset 0.00, using font size 15.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Set temp_point_9 = (Position of Circle (MM.1) 0131 <gen>)
      • Floating Text - Create floating text that reads Training Grounds at temp_point_9 with Z offset 0.00, using font size 14.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Set temp_point_10 = (Position of Circle (MM.1) 0117 <gen>)
      • Floating Text - Create floating text that reads Central Park at temp_point_10 with Z offset 0.00, using font size 15.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Set temp_point_11 = (Position of Circle (MM.1) 0135 <gen>)
      • Floating Text - Create floating text that reads Bandit Hideout at temp_point_11 with Z offset 0.00, using font size 13.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Custom script: call RemoveLocation(udg_temp_point_1)
      • Custom script: call RemoveLocation(udg_temp_point_2)
      • Custom script: call RemoveLocation(udg_temp_point_3)
      • Custom script: call RemoveLocation(udg_temp_point_4)
      • Custom script: call RemoveLocation(udg_temp_point_5)
      • Custom script: call RemoveLocation(udg_temp_point_6)
      • Custom script: call RemoveLocation(udg_temp_point_7)
      • Custom script: call RemoveLocation(udg_temp_point_8)
      • Custom script: call RemoveLocation(udg_temp_point_9)
      • Custom script: call RemoveLocation(udg_temp_point_10)
      • Custom script: call RemoveLocation(udg_temp_point_11)
      • Custom script: call DestroyTrigger( GetTriggeringTrigger() )
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
Well, floating texts leak if not... but I guess those are just area labels and you need them throughout the game...
Have in mind that there is a limit of 100 floating texts displayed at the same time. (May have been increased in 1.29, no idea)

I am not sure if this part would work at all.
  • Custom script: call DestroyTrigger( GetTriggeringTrigger() )
don't you rather want to do:
  • Custom script: call DestroyTrigger( This Trigger )
or what are you trying to achieve with this?

The trigger could be optimized a bit, you don't need 11 point variables but 1.

  • Set temp_point_1 = (Center of Shipyard <gen>)
  • Floating Text - Create floating text that reads Shipyard at temp_point_1 with Z offset 0.00, using font size 15.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
  • Custom script: call RemoveLocation(udg_temp_point_1)
  • Set temp_point_1 = (Center of Circle of Power 0034 <gen>)
  • Create floating text that reads Seven Cross Keep at temp_point_2 with Z offset 0.00, using font size 20.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
  • Custom script: call RemoveLocation(udg_temp_point_1)
  • ...
  • And so on and so on
regards
-Ned
 
Last edited:
Level 2
Joined
May 13, 2017
Messages
21
Oh, Thank You...

Well with this custom script...
  • Custom script: call DestroyTrigger( GetTriggeringTrigger() )
I just found it in a tutorial about leaks, they said if the trigger is only used once, i should put that at the end part of the trigger.

Should I prefer using this?
  • Custom script: call DestroyTrigger( This Trigger )
Hahahaha I didn't realize that i dont need to create multiple point variables thankss.
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
Oh, Thank You...

Well with this custom script...
  • Custom script: call DestroyTrigger( GetTriggeringTrigger() )
I just found it in a tutorial about leaks, they said if the trigger is only used once, i should put that at the end part of the trigger.

Should I prefer using this?
  • Custom script: call DestroyTrigger( This Trigger )

To be honest, I am not 100% sure if this is correct actually, I was thinking in GUI on a JASS line...

We have this in GUI
  • Set TrigVariable = ThisTrigger
and
  • Turn off (ThisTrigger)
But I am not sure if ThisTrigger GUI interface does not actually translate into GetTriggeringTrigger() in JASS...

I'll need WE to check on this. You could do yourself actually, make a GUI trigger, no event, no conditions, just the above line in the actions. Then click Edit on the top menu and chose "convert to custom script". See what happens.

regards
-Ned
 
Level 2
Joined
May 13, 2017
Messages
21
To be honest, I am not 100% sure if this is correct actually, I was thinking in GUI on a JASS line...

We have this in GUI
  • Set TrigVariable = ThisTrigger
and
  • Turn off (ThisTrigger)
But I am not sure if ThisTrigger GUI interface does not actually translate into GetTriggeringTrigger() in JASS...

I'll need WE to check on this. You could do yourself actually, make a GUI trigger, no event, no conditions, just the above line in the actions. Then click Edit on the top menu and chose "convert to custom script". See what happens.

regards
-Ned

Thank you for the help, that really helps
 
Level 2
Joined
May 17, 2018
Messages
16
Hey there i might have a similar problem trying to do this map where you open the door by typing in a text.(basically the purple text is what u have to input and the red and green lines are a time indicator)

upload_2018-5-21_15-45-27.png


I tried to make sure i stay below the 100 Floating text. The purple text is 1 floating text each and every single red and green bar are their very own floating texts, which should make for 50 floating texts @ 10 players.
Once the time is up (all green lines turn to red) a new purple floating text is created, all Lines are destroyed and new green ones are created. Anyways so much for the Background.
Problem is even tho it works for most players theres always some player that where the floating text isnt displayed properly (missing purple text or just 2 redlines or similar instead of all lines). Also apparently each big cycle there is a chance for the problem to get worse.
Can you just take a quick look even if its just superficial where there could be leaks especially related to floating texts.

upload_2018-5-21_15-59-21.png

upload_2018-5-21_16-1-52.png
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
@xRockx Well, not the same problem at all. Suggest to make a new thread.

Going to help anyway :)

So, each letter is a separate floating text? There is absolutely no need for this. You should od it with a single floating text like this:
na@ IIII
Don't change the floating text, just its string content. If you want the "different height effect", well, I'd not recommend that...

Would you mind posting your triggers in trigger tags, like this:
  • TriggerName
    • Events
    • Conditions
    • Actions
I'll take a look later and this would help TREMENDOUSLY. Feel free to do it in a new thread.

regards
-Ned
 
Level 2
Joined
May 17, 2018
Messages
16
I will gladly do that but not sure how those trigger tags work tho
 
Last edited:
Status
Not open for further replies.
Top