• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

How works camera attack angle?

Status
Not open for further replies.
Level 24
Joined
Jun 26, 2020
Messages
1,938
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,938
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