-zoom trigger variable

BLQQD

New Member
Reaction score
2
Trigger:
  • Zoom
    • Events
      • Player - Player 1 (Red) types a chat message containing -zoom as A substring
      • Player - Player 2 (Blue) types a chat message containing -zoom as A substring
      • Player - Player 3 (Teal) types a chat message containing -zoom as A substring
      • Player - Player 4 (Purple) types a chat message containing -zoom as A substring
      • Player - Player 5 (Yellow) types a chat message containing -zoom as A substring
      • Player - Player 6 (Orange) types a chat message containing -zoom as A substring
      • Player - Player 7 (Green) types a chat message containing -zoom as A substring
      • Player - Player 8 (Pink) types a chat message containing -zoom as A substring
      • Player - Player 9 (Gray) types a chat message containing -zoom as A substring
      • Player - Player 10 (Light Blue) types a chat message containing -zoom as A substring
      • Player - Player 11 (Dark Green) types a chat message containing -zoom as A substring
      • Player - Player 12 (Brown) types a chat message containing -zoom as A substring
    • Conditions
    • Actions
      • Camera - Set (Triggering player)'s camera Distance to target to (Real((Substring((Entered chat string), 7, 10)))) over 0.00 seconds
That would be the zoom command.

To start the game at a certain distance it would be...
Trigger:
  • Cam Init
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Camera - Set (Triggering player)'s camera Distance to target to 2000.00 over 0.00 seconds


Camera Height Offset is different from Distance to target. Camera Height Offset changes the Z value (the literally height) of the camera while Distance to target stretches the camera. Not sure how these make visual differences, though...

ok so ive got everything up to

Camera - Set (Triggering player)'s camera Distance to target to --->(Real((Substring((Entered chat string), 7, 10)))) over 0.00 seconds

but i dont get how to add this... can sum1 explain? or point me to a tutorial type thing
 

tooltiperror

Super Moderator
Reaction score
231
The SubString is what you probably don't get. Substring is just a part of a string.

Take the string "HELLO".

SubString 1,2 is from the start of the first character to the start of the second.

JASS:
                                                                                                                                                            .
  H  E  L  L  O
 1  2  3  4  5
 

BLQQD

New Member
Reaction score
2
ok my question is
how do i add (Real((Substring((Entered chat string), 7, 10))))
cant find anything like that and i dont know how to create a variable with it

help plz?


Edit
Nor can i find how to add a substring....
Edit2
ok found really bad tutorial on strings.... also figured out how to create a string but no idea how to make it work with the trigger
i tried putting (Real((Substring((Entered chat string), 7, 10)))) as the initial value of my string but it doesnt show up as a usable string under variables
 

BEeeH-

New Member
Reaction score
2
Here u go!:) This is a fully working zoom trigger. Take a look at it and you will understand, or just copy it. :p

Trigger:
  • Zoom
    • Events
      • Player - Player 1 (Red) types a chat message containing -zoom as A substring
      • Player - Player 2 (Blue) types a chat message containing -zoom as A substring
      • Player - Player 3 (Teal) types a chat message containing -zoom as A substring
      • Player - Player 4 (Purple) types a chat message containing -zoom as A substring
      • Player - Player 5 (Yellow) types a chat message containing -zoom as A substring
      • Player - Player 6 (Orange) types a chat message containing -zoom as A substring
      • Player - Player 7 (Green) types a chat message containing -zoom as A substring
      • Player - Player 8 (Pink) types a chat message containing -zoom as A substring
      • Player - Player 9 (Gray) types a chat message containing -zoom as A substring
      • Player - Player 10 (Light Blue) types a chat message containing -zoom as A substring
      • Player - Player 11 (Dark Green) types a chat message containing -zoom as A substring
      • Player - Player 12 (Brown) types a chat message containing -zoom as A substring
    • Conditions
      • (Substring((Entered chat string), 1, 5)) Equal to -zoom
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 1, 6)) Equal to -zoom
          • (Integer((Substring((Entered chat string), 7, (Length of (Entered chat string)))))) Greater than or equal to X, (for example 1400)
          • (Integer((Substring((Entered chat string), 7, (Length of (Entered chat string)))))) Less than or equal to Y, (for example: 3000)
        • Then - Actions
          • Camera - Set (Triggering player)'s camera Distance to target to (Real((Substring((Entered chat string), 7, (Length of (Entered chat string)))))) over 0.00 seconds
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Integer((Substring((Entered chat string), 7, (Length of (Entered chat string)))))) Greater than or equal to Y + 1, (for example: 3001)
            • Then - Actions
              • Camera - Set (Triggering player)'s camera Distance to target to Y, (for example: 3000.00) over 0.00 seconds
            • Else - Actions
 

BLQQD

New Member
Reaction score
2
ok, been searching through real, string, and integer comparisons and such for an hour now........ can u tell me what comparison type the following is under???

(Integer((Substring((Entered chat string), 7, (Length of (Entered chat string)))))) Greater than or equal to X, (for example 1400)


EDIT
btw MASSIVE thx.... mind helping me understand it? xD
 

Komaqtion

You can change this now in User CP.
Reaction score
469
First you should choose "Real Comparison", then from the drop-down menu you choose "Conversion - Convert String To Real".
Then you choose "Substring" and as the red "String" you choose "(Entered chat string)" and then you choose the other stuff ;)
 

BLQQD

New Member
Reaction score
2
got me closer but i hit a wall
i get stuk at
(Real((Substring((Entered chat string), 7, 7)))) Greater than or equal to 0.00
or
(Integer((Substring((Entered chat string), 7, 7)))) Greater than or equal to 0
how do i get the other part in there? theres seems to be no place for it
and how do i get only a single 7? and how do i add the X?
aiming for
(Integer((Substring((Entered chat string), 7, (Length of (Entered chat string)))))) Greater than or equal to X
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top