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

[Trigger] Toggle-able Strategic View

Status
Not open for further replies.
Level 2
Joined
Jan 8, 2014
Messages
10
So I am attempting to make an RTS map using the editor, and one thing that is really constraining me is the game camera's maximum zoom. This is because I have scaled up ships, buildings, and some terrain to be more realistic proportional to units (who themselves have been scaled down).

I decided I would make an ability called "Strategic View" for the player to use to zoom the camera out (with some help from triggers). All the player would have to do is select any unit, and they would have the Strategic View ability. Turning it on would zoom the camera out (so the player isn't so zoomed in) and fix it on that unit, while turning it off would return the camera back to normal. This way, even if another unit is selected in the meantime, the strategic view still applies to that original unit until that unit turns it off.

However, my ineptitude in triggering has prevented me from implementing this, so I hope someone can help me out.

Here are the triggers I used:

  • Strategic View Red1
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • (Ability being cast) Equal to Strategic View
      • (Owner of (Triggering unit)) Equal to Player 1 (Red)
    • Actions
      • Trigger - Turn on Strategic View Red2 <gen>
      • Set Strat_View_Caster_Red = (Triggering unit)
  • Strategic View Red2
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Camera - Pan camera for Player 1 (Red) to (Position of Strat_View_Caster_Red) with height 100.00 above the terrain over 5.00 seconds
      • Trigger - Turn off Strategic View Red1 <gen>
  • Strategic View Red3
    • Events
      • Unit - A unit Stops casting an ability
    • Conditions
      • (Ability being cast) Equal to Strategic View
      • (Owner of (Triggering unit)) Equal to Player 1 (Red)
    • Actions
      • Trigger - Turn off Strategic View Red2 <gen>
      • Trigger - Turn on Strategic View Red1 <gen>
As you can tell I'm not a very good trigger-er, so if you guys could please help me solve this trigger that would be great.
 
You can try out my http://www.hiveworkshop.com/forums/...0-1-a-239423/?prev=status=a&u=deathismyfriend
The system allows users to change the height / rotation and the angle of attack with their arrow keys. It should fix the problems you are having.
It is set to use commands to lock the player to the unit. But you can also force their camera to lock ( they won't be able to lock or unlock depending on what you choose.)
The changing on locking cameras can be done at any time in the map.
You can make certain areas have the camera locked to a rotation / angle of attack and height. ( which will either limit the players view or maximize it depending on what you want.)

It is an advanced system but it is not hard to use just follow the directions.
Also this can be used in GUI / Triggers even though the script is in jass.
The only stuff you need to know in jass are the custom scripts which are easily explained on how to use.
 
Level 6
Joined
Feb 5, 2012
Messages
1,685
You can try out my http://www.hiveworkshop.com/forums/...0-1-a-239423/?prev=status=a&u=deathismyfriend
The system allows users to change the height / rotation and the angle of attack with their arrow keys. It should fix the problems you are having.
It is set to use commands to lock the player to the unit. But you can also force their camera to lock ( they won't be able to lock or unlock depending on what you choose.)
The changing on locking cameras can be done at any time in the map.
You can make certain areas have the camera locked to a rotation / angle of attack and height. ( which will either limit the players view or maximize it depending on what you want.)

It is an advanced system but it is not hard to use just follow the directions.
Also this can be used in GUI / Triggers even though the script is in jass.
The only stuff you need to know in jass are the custom scripts which are easily explained on how to use.

Yeah agree on the above.. it is really designed for fast pace games..
 
Level 7
Joined
Mar 6, 2006
Messages
282
The action you're looking for is called ' Camera - Set Camera Field (Timed) '

Camera fields are things like: Angle of Attack, Distance to Target, Field of View, etc.

Zooming would be Distance to Target, where the camera moves along its angle either closer or further from the ground.

  • Camera - Set Player 1 (Red)'s camera Distance to target to 2700.00 over 1.00 seconds
 
Level 2
Joined
Jan 8, 2014
Messages
10
Thank you very much for that. I did successfully get the Strategic View ability to work. However, I know have a new problem.

In the editor, when you zoom out, a black mask seems to cover everything until you can't see anything anymore. I know that in the editor to push back the mask you just Ctrl + Scroll Down, but how about in-game?

This is a problem because if the ability makes the player's camera zoom out too far, a black mask covers the screen that stops them from being able to see the map.
 
Status
Not open for further replies.
Top