• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece!🔗 Click here to enter!

[Trigger] What is wrong with this?

Status
Not open for further replies.
Level 20
Joined
Jan 6, 2008
Messages
2,627
THIS IS SOLVED
12 of these with different Variables
  • Khajiit
    • Events
      • Player - Player 1 (Red) Selects a unit
    • Conditions
      • (Triggering unit) Equal to Dummy Inventory Slot 0019 <gen>
    • Actions
      • For each (Integer A) from 1 to 24, do (Actions)
        • Loop - Actions
          • Floating Text - Destroy Info[(Integer A)]
      • Wait 0.01 seconds
      • Unit - Create 1 Khajiit for Neutral Passive at (Center of Region 007 <gen>) facing 360.00 degrees
      • Set Unit = (Last created unit)
      • Selection - Clear selection for Player 1 (Red)
      • Destructible - Show OK 0105 <gen>
      • Unit - Unhide Dummy Inventory Slot 0022 <gen>
      • Floating Text - Create floating text that reads Khajiit at (Center of Unit Race Name <gen>) with Z offset 0.00, using font size 12.00, color (20.00%, 100.00%, 20.00%), and 0.00% transparency
      • Set Info[1] = (Last created floating text)
      • Floating Text - Create floating text that reads A cat textured huma... at (Center of Unit Info <gen>) with Z offset 0.00, using font size 10.00, color (60.00%, 30.00%, 20.00%), and 0.00% transparency
      • Set Info[2] = (Last created floating text)
      • Unit - Create 1 Khajiit for Player 12 (Brown) at (Center of (Playable map area)) facing Default building facing degrees
      • Set PLAYER_CONTROLLER = (Last created unit)
      • Floating Text - Create floating text that reads ((String((Life of PLAYER_CONTROLLER))) + ( + (String((Max mana of PLAYER_CONTROLLER))))) at (Center of Hpmana <gen>) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Set HpMana[1] = (Last created floating text)
      • Floating Text - Create floating text that reads (((String((Strength of PLAYER_CONTROLLER (Exclude bonuses)))) + ) + (((String((Agility of PLAYER_CONTROLLER (Exclude bonuses)))) + at (Center of Region 019 <gen>) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Set Stats[1] = (Last created floating text)
      • Unit - Remove PLAYER_CONTROLLER from the game
An Leakless Trigger
  • Leakless
    • Events
      • Player - Player 1 (Red) Selects a unit
      • Time - Every 0.01 seconds of game time
    • Conditions
      • ((Unit-type of (Triggering unit)) Equal to Dummy Inventory Slot) or ((Number of units in (Units owned by Neutral Passive)) Greater than or equal to 2)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Triggering unit) Equal to Dummy Inventory Slot 0022 <gen>
        • Then - Actions
          • Skip remaining actions
        • Else - Actions
          • Set Temp_Group = (Units owned by Neutral Passive)
          • For each (Integer A) from 1 to 12, do (Actions)
            • Loop - Actions
              • Floating Text - Destroy HpMana[(Integer A)]
              • Floating Text - Destroy Stats[(Integer A)]
          • For each (Integer A) from 1 to 24, do (Actions)
            • Loop - Actions
              • Floating Text - Destroy Info[(Integer A)]
          • Unit Group - Pick every unit in Temp_Group and do (Actions)
            • Loop - Actions
              • Unit Group - Pick every unit in Temp_Group and do (Unit - Remove (Picked unit) from the game)
          • Custom script: call DestroyGroup (udg_Temp_Group)
Now, the problem is that my Floating text

  • Set PLAYER_CONTROLLER = (Last created unit)
    • Floating Text - Create floating text that reads ((String((Life of PLAYER_CONTROLLER))) + ( + (String((Max mana of PLAYER_CONTROLLER))))) at (Center of Hpmana <gen>) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
    • Set HpMana[1] = (Last created floating text)
    • Floating Text - Create floating text that reads (((String((Strength of PLAYER_CONTROLLER (Exclude bonuses)))) + ) + (((String((Agility of PLAYER_CONTROLLER (Exclude bonuses)))) + at (Center of Region 019 <gen>) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
    • Set Stats[1] = (Last created floating text)
    • Unit - Remove PLAYER_CONTROLLER from the game

Will not show up.

Or, it shows up. but only as 0, Its the Campaign units with Modified Stats, but it only says
0.0000
0.0000
0
0
0
EDIT: It worked before
 
Last edited:
Level 7
Joined
Nov 4, 2006
Messages
153
Eh, I'm not even sure what I should say to this except that it is done poorly.

The problem is probably your Time even in your "Leakless" trigger.
There's two things wrong that I can think of right now:
1. .01 seconds all game? = much lag
2. it goes off every .01 seconds but the condition won't work for it; there is no triggering unit. It will still go off though because there are more than 2 neutral passive units (I think). (BTW, what's the point of checking if it is of that type in your leakless trigger if you do nothing with it later. I suggest just removing that if statement and condition. So then it will only check if Neutral Passive => 2 then do whatever.) But because the triggering unit condition was not right, it goes to your else statement, destroying your text almost right away.

Another thing, in your "Khajiit" trigger, why the .01 wait? Firstly, it won't wait that short of a time and is pointless. I suggest removing it.

Now I don't know why the text is coming out as 0, or even why its showing at all... can't help you there cause I'm a bit confused on what you're doing.
 
Level 20
Joined
Jan 6, 2008
Messages
2,627
1, it doesnt lag
2, Why is the title named Leakless? Because this remove the leaks, thats why.
3, It worked before, but could it be cuz of Campaign Unit?
and 4, your post didnt mean anything

EDIT: i figured it out! It was because the Unit didnt respond in the test map, since its the campaign, so i had to test the Campaign, + rep anyways to Pharao
 
Status
Not open for further replies.
Top