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

[Trigger] Leak? & Trigger Help

Status
Not open for further replies.
Level 1
Joined
Jan 6, 2009
Messages
1
I have 2 Questions that I am hoping will be answerabe.

The first being a leak check, im pretty sure that it doesn't have leaks but im was hoping for a more professional opinion, so heres the trigger.

Its a Skate trigger for an Escape or Maze map that I have been experimenting with and hopefully have it correct, it does work in game i know that.
  • Slide and Death
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Set Heroes = (Units of type Demon Hunter)
      • Unit Group - Pick every unit in Heroes and do (Actions)
        • Loop - Actions
          • Set HeroPosition = (Position of (Picked unit))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is alive) Equal to True
              • (Terrain type at (Position of (Picked unit))) Equal to Slide_Terrain_Type
            • Then - Actions
              • Unit Group - Add (Picked unit) to Slide_Heroes
              • Set HeroPosition = (Position of (Picked unit))
              • Set Slide_Point = (HeroPosition offset by Slide_Speed towards (Facing of (Picked unit)) degrees)
              • Unit - Move (Picked unit) instantly to Slide_Point
              • Custom script: call RemoveLocation( udg_Slide_Point )
            • Else - Actions
              • Unit Group - Remove (Picked unit) from Slide_Heroes
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Terrain type at (Position of (Picked unit))) Equal to Death_Terrain
                  • ((Picked unit) is alive) Equal to True
                • Then - Actions
                  • Unit - Kill (Picked unit)
                • Else - Actions
                  • Custom script: call RemoveLocation( udg_HeroPosition )
My 2nd question is a trigger help question.

Its a change vertex colour trigger using substrings. chatsrings and variables.
  • Colour Change
    • Events
      • Player - Player 1 (Red) types a chat message containing -vc as A substring
      • Player - Player 2 (Blue) types a chat message containing -vc as A substring
      • Player - Player 3 (Teal) types a chat message containing -vc as A substring
      • Player - Player 4 (Purple) types a chat message containing -vc as A substring
      • Player - Player 5 (Yellow) types a chat message containing -vc as A substring
      • Player - Player 6 (Orange) types a chat message containing -vc as A substring
      • Player - Player 7 (Green) types a chat message containing -vc as A substring
      • Player - Player 8 (Pink) types a chat message containing -vc as A substring
      • Player - Player 9 (Gray) types a chat message containing -vc as A substring
      • Player - Player 10 (Light Blue) types a chat message containing -vc as A substring
      • Player - Player 11 (Dark Green) types a chat message containing -vc as A substring
    • Conditions
    • Actions
      • Set VCRed = (Real((Substring((Entered chat string), 5, 7))))
      • Set VCBlue = (Real((Substring((Entered chat string), 9, 11))))
      • Set VCGreen = (Real((Substring((Entered chat string), 13, 15))))
      • Set VCTransperency = (Real((Substring((Entered chat string), 17, 19))))
      • Unit Group - Pick every unit in (Units owned by (Triggering player)) and do (Animation - Change (Picked unit)'s vertex coloring to (VCRed%, VCBlue%, VCGreen%) with VCTransperency% transparency)
      • Game - Display to (Player group((Triggering player))) the text: ((Vertex Colour Set: |cffff0000Text Red = + ((Substring((Entered chat string), 5, 7)) + %,|r |CFF0042FF Blue = )) + (((Substring((Entered chat string), 9, 11)) + %,|R |CFF20C000 Green = ) + ((((Substring((Entered chat string), 13, 15)) + %,|R |CFF959697 Transparency = ) + ((Substring((Entered chat string), 17, 19)) + %.|R
The help i need with this trigger is that when im in game and i type -vc 100 100 100, this works perfectly fine, but when i want to change to vertex to something other than default and have a visible transparency it doesnt work. E.G. If i do -vc 30 50 70 90 it doesnt work because the numbers dont line up with the position i used in the substring.
  • ((Substring((Entered chat string), 5, 7))
  • ((Substring((Entered chat string), 9, 11))
  • ((Substring((Entered chat string), 13, 15))
  • ((Substring((Entered chat string), 17, 19))
Im sure most of you know that the numbers at the end of the above trigger signify the part of the chatstring that it uses, this one being from the 5th to the 7th letter, but if i want to only use 2 numbers it doesnt work cause it only uses the 5th and 6th chat letter this then screws up the position for the next substing and will make it incorrect.

My question is is there a better way to do this or is it possible to make it only recognise that there was only 1 or 2 of the chat letters used for the 5-7, 9-11, 13-15 and 17-19 parts so that it still work no matter how many numbers you put in?
 
Status
Not open for further replies.
Top