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

Condition help

Status
Not open for further replies.
Level 6
Joined
Mar 2, 2013
Messages
127
Well this is how i have the trigger
I had another trigger like this but it was

  • Player - Player 2 (Blue) types a chat message containing -C as A substring
and a -clear command

but they kinda messed with each other, thats why i need to check if the entered string is != to 15151313(numbers) so i can skip remaining actions o_o


  • Events
    • Player - Player 2 (Blue) types a chat message containing -Cam as A substring
  • Conditions
  • Actions
    • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Substring((Entered chat string), 6, (Length of (Entered chat string)))) Equal to (==) Empty String
      • Then - Actions
        • Skip remaining actions
      • Else - Actions
    • Set Cam_Dis = (Real((Substring((Entered chat string), 6, (Length of (Entered chat string))))))
    • Camera - Set (Triggering player)'s camera Distance to target to Cam_Dis over 0.25 seconds
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Cam_Dis Greater than or equal to (>=) 3000.00
        • Then - Actions
          • Camera - Set (Triggering player)'s camera Distance to target to 3000.00 over 0.50 seconds
          • Set Cam_Dis = 3000.00
          • Game - Display to (All players matching ((Triggering player) Equal to (==) (Matching player))) for 4.00 seconds the text: Camera Set To 3000
        • Else - Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Cam_Dis Less than or equal to (<=) 1500.00
        • Then - Actions
          • Camera - Set (Triggering player)'s camera Distance to target to 1500.00 over 0.50 seconds
          • Set Cam_Dis = 1500.00
          • Game - Display to (All players matching ((Triggering player) Equal to (==) (Matching player))) for 4.00 seconds the text: Camera Set To 1500
        • Else - Actions
 
HolyBear said:
but they kinda messed with each other, thats why i need to check if the entered string is != to 15151313(numbers) so i can skip remaining actions o_o

That's because you're not checking the substring, which means any string that contains -c (like -clear), will fire. Try something like this in each of your command triggers:

  • Conditions
    • (Substring((Entered chat string), 1, 2)) Equal to -c
and

  • Conditions
    • (Substring((Entered chat string), 1, 6)) Equal to -clear
 
Status
Not open for further replies.
Top