• 🏆 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!

-zoom system

Status
Not open for further replies.
Level 6
Joined
Sep 24, 2015
Messages
174
Hi, How to - zoom if one player writes -zoom with a number :

EG : -zoom 1300 ----> set the camera distance to 2000

I want do a trigger with numbers between 1 and 1337 and it would set the camera distance automatically at the right distance.

I did this trigger but it seems not working :(

  • zoom trigger
    • Event
    • Conditions
    • Actions
      • Set ZoomInteger = (Integer((Random real number between 1.00 and 1400.00)))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ZoomInteger Less or Equal to 1400
        • Then - Actions
          • Camera - Set Joueur 1 (Red)'s camera Distance target to (Real(Zoom2)) over 0.00 seconds
        • Else - Actions
          • Do nothing
Zoom2 = string variable

ZoomInteger = Integer variable ( thanks captain obvious) xD
 
Level 6
Joined
Sep 24, 2015
Messages
174
int the trigger you showed me it's to zoom with a number set

EG: you write -zoom 300 and it sets camera distance to 300

what if i add a variable random number between 1 and 1400

and if a player writes -zoom x x=number

it should -zoom x

i don't know if you get what i'm trying to explain here...

i dont wanna make a trigger for each number from 1 to 1400 xD

i wanna make a trigger wich it takes the entered chat string and -zooms the entered chat string number...

hope you get it xD
 
Level 6
Joined
Sep 24, 2015
Messages
174
thank you guys it worked fine :)

But my question is now how to display to all the players the substring name?

Because i did this trigger for -name substring too and i want that when a player writes -name substring then it shows to all the player :player x is now known as length of(entered chat string)

I did like this :

  • Game - Display to (All players) the text: (Entered chat string)
But again...it's not working -_-
 
Last edited:
Level 37
Joined
Jul 22, 2015
Messages
3,485
thank you guys it worked fine :)

But my question is now how to display to all the players the substring name?

Because i did this trigger for -name substring too and i want that when a player writes -name substring then it shows to all the player :player x is now known as length of(entered chat string)

I did like this :

  • Game - Display to (All players) the text: (Entered chat string)
But again...it's not working -_-

Did you not see BloodDrunk's post? Just apply that same function in a concatenate string function.
 
Level 6
Joined
Sep 24, 2015
Messages
174
yes, i found the solution :)

  • zoom trigger general
    • Event
      • Player - Player 1 (Red) types a chat message containing -zoom as Substring
      • Player - Player 2 (Blue) types a chat message containing -zoom as Substring
      • Player - Player 3 (Teal) types a chat message containing -zoom as Substring
      • Player - Player 4 (Purple) types a chat message containing -zoom as Substring
      • Player - Player 5 (Yellow) types a chat message containing -zoom as Substring
      • Player - Player 6 (Orange) types a chat message containing -zoom as Substring
      • Player - Player 7 (Green) types a chat message containing -zoom as Substring
      • Player - Player 8 (Pink) types a chat message containing -zoom as Substring
      • Player - Player 9 (grey) types a chat message containing -zoom as Substring
      • Player - Player 10 (Lightblue) types a chat message containing -zoom as Substring
      • Player - Player 11 (Dark Green) types a chat message containing -zoom as Substring
      • Player - Player 12 (Brown) types a chat message containing -zoom as Substring
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 1, 5)) Equal to* -zoom
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Substring((Entered chat string), 6, (Length of (Entered chat string)))) Different of <empty string>
            • Alors - Actions
              • Set TempReal = (Real((Substring((Entered chat string), 7, (Length of (Entered chat string))))))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • Si - Conditions
                  • TempReal Less than* 1000.00
                • Alors - Actions
                  • Camera - Set (Triggering player)'s camera Target to 1000.00 over 1.00 seconds
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • TempReal Greater than 3000.00
                    • Then - Actions
                      • Camera - Set (Triggering player)'s camera target to 3000.00 over 1.00 seconds
                    • Else - Actions
                      • Camera - Set (Triggering player)'s camera Distance target to TempReal over 1.00 seconds
            • Else - Actions
              • Camera - Reset camera for (Triggering player) to standard game-view over 1.00 seconds
        • Else - Actions
 
  • UpPressed
    • Events
      • Player - Player 1 (Red) Presses the Up Arrow key
      • Player - Player 2 (Blue) Presses the Up Arrow key
      • Player - Player 3 (Teal) Presses the Up Arrow key
      • Player - Player 4 (Purple) Presses the Up Arrow key
      • Player - Player 5 (Yellow) Presses the Up Arrow key
      • Player - Player 6 (Orange) Presses the Up Arrow key
      • Player - Player 7 (Green) Presses the Up Arrow key
      • Player - Player 8 (Pink) Presses the Up Arrow key
    • Conditions
      • ESCHasBeenPressed[(Player number of (Triggering player))] Equal to False
      • (Distance to target of the current camera view) Less than 7000.00
    • Actions
      • Camera - Set (Player((Player number of (Triggering player))))'s camera Distance to target to ((Distance to target of (Current camera)) + 300.00) over 0.50 seconds
      • Camera - Set (Player((Player number of (Triggering player))))'s camera Height Offset to ((Height Offset of (Current camera)) + 20.00) over 0.50 seconds
 
Last edited:
Status
Not open for further replies.
Top