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:
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)
-
Events
-
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>
-
Events
-
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>
-
Events