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

How works camera attack angle?

Status
Not open for further replies.
Level 24
Joined
Jun 26, 2020
Messages
1,853
I made a triggers to change the attack angle of the camera
  • Subir camara
    • Events
      • Unit - A unit Issues an order with no target
    • Conditions
      • (Unit-type of (Ordered unit)) Equal to Circle of power
      • ((Issued order) Equal to (Order(manashieldon))) or ((Issued order) Equal to (Order(manashieldoff)))
    • Actions
      • Game - Display to (All players) the text: (String((Attack angle of the current camera view)))
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Ordered unit) Equal to Circle[(Integer A)]
            • Then - Actions
              • Set Angulo_de_camara[(Integer A)] = ((Attack angle of the current camera view) - 5.00)
              • Camera - Set (Owner of (Ordered unit))'s camera Attack angle to Angulo_de_camara[(Integer A)] over 0.10 seconds
            • Else - Actions
  • Bajar camara
    • Events
      • Unit - A unit Issues an order with no target
    • Conditions
      • (Unit-type of (Ordered unit)) Equal to Circle of power
      • ((Issued order) Equal to (Order(inmmolation))) or ((Issued order) Equal to (Order(uninmmolation)))
    • Actions
      • Game - Display to (All players) the text: (String((Attack angle of the current camera view)))
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Ordered unit) Equal to Circle[(Integer A)]
            • Then - Actions
              • Set Angulo_de_camara[(Integer A)] = ((Attack angle of the current camera view) + 5.00)
              • Camera - Set (Owner of (Ordered unit))'s camera Attack angle to Angulo_de_camara[(Integer A)] over 0.10 seconds
            • Else - Actions
The thing is just with press it once the attack angle turns to 360 (or 0) and I can just change it around this values:
1623039141811.png

What's wrong?
 
I made a triggers to change the attack angle of the camera
  • Subir camara
    • Events
      • Unit - A unit Issues an order with no target
    • Conditions
      • (Unit-type of (Ordered unit)) Equal to Circle of power
      • ((Issued order) Equal to (Order(manashieldon))) or ((Issued order) Equal to (Order(manashieldoff)))
    • Actions
      • Game - Display to (All players) the text: (String((Attack angle of the current camera view)))
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Ordered unit) Equal to Circle[(Integer A)]
            • Then - Actions
              • Set Angulo_de_camara[(Integer A)] = ((Attack angle of the current camera view) - 5.00)
              • Camera - Set (Owner of (Ordered unit))'s camera Attack angle to Angulo_de_camara[(Integer A)] over 0.10 seconds
            • Else - Actions
  • Bajar camara
    • Events
      • Unit - A unit Issues an order with no target
    • Conditions
      • (Unit-type of (Ordered unit)) Equal to Circle of power
      • ((Issued order) Equal to (Order(inmmolation))) or ((Issued order) Equal to (Order(uninmmolation)))
    • Actions
      • Game - Display to (All players) the text: (String((Attack angle of the current camera view)))
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Ordered unit) Equal to Circle[(Integer A)]
            • Then - Actions
              • Set Angulo_de_camara[(Integer A)] = ((Attack angle of the current camera view) + 5.00)
              • Camera - Set (Owner of (Ordered unit))'s camera Attack angle to Angulo_de_camara[(Integer A)] over 0.10 seconds
            • Else - Actions
The thing is just with press it once the attack angle turns to 360 (or 0) and I can just change it around this values:
View attachment 381092
What's wrong?
Without really understanding your question or what you're after, I guess that the numbers you show are in radians, not degrees.

This means that instead of "+5" you should do "+(Degrees to Radians(5))" to change it by 5 degrees.

Also, hopefully only ONE unit of Circle[] is ordered at the time, otherwise you will get many degrees change.
 
Level 24
Joined
Jun 26, 2020
Messages
1,853
Without really understanding your question or what you're after, I guess that the numbers you show are in radians, not degrees.

This means that instead of "+5" you should do "+(Degrees to Radians(5))" to change it by 5 degrees.

Also, hopefully only ONE unit of Circle[] is ordered at the time, otherwise you will get many degrees change.
I though thst but the reason what I didn't consider it is because "that number can't be bigger the pi (3.14)" but you reply make me remember that a complete round is 2*pi (6.28) so I will try it later, thanks.
 
Status
Not open for further replies.
Top