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

Hero cam

Status
Not open for further replies.
Level 1
Joined
Jul 16, 2009
Messages
3
If you've ever played a Hero wars map, you know what I'm talking about. I've tried and tried to code a hero cam that works like the one in "Hero Wars Icelands" and "Hero wars Exiled" but they are always too far away from the hero, or drift away when I turn, and never go back.

My current trigger is this:

  • Hero Cam Main
    • Events
      • Player - Player 1 (Red) types a chat message containing -oncam as An exact match
      • Player - Player 2 (Blue) types a chat message containing -oncam as An exact match
      • Player - Player 3 (Teal) types a chat message containing -oncam as An exact match
      • Player - Player 4 (Purple) types a chat message containing -oncam as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -oncam as An exact match
      • Player - Player 6 (Orange) types a chat message containing -oncam as An exact match
      • Player - Player 7 (Green) types a chat message containing -oncam as An exact match
      • Player - Player 8 (Pink) types a chat message containing -oncam as An exact match
      • Player - Player 9 (Gray) types a chat message containing -oncam as An exact match
      • Player - Player 11 (Dark Green) types a chat message containing -oncam as An exact match
    • Conditions
    • Actions
      • Set Herocam = (Current camera)
      • Set CamON[(Player number of (Triggering player))] = 1
      • Camera - Pan camera for (Triggering player) to (Position of PlayerMainHeros[(Player number of (Triggering player))]) over 1.00 seconds
      • Camera - Lock camera target for (Triggering player) to PlayerMainHeros[(Player number of (Triggering player))], offset by (0.00, -500.00) using Default rotation
      • Camera - Set Players[(Player number of (Triggering player))]'s camera Distance to target to 0.00 over 0.75 seconds
      • Camera - Set (Triggering player)'s camera Angle of attack to -20.00 over 0.75 seconds
      • Camera - Set (Triggering player)'s camera Rotation to (Facing of PlayerMainHeros[(Player number of (Triggering player))]) over 0.75 seconds
      • Wait 0.50 seconds
      • Trigger - Run (This trigger) (checking conditions)
With the variables being the heros the players will select. And it works really well, until I turn my hero, and then it zooms way back out. I want it to stay up tight to the hero, and not drift back to this "half way" spot in between the hero and the normal view.

Anyone know how the creators of Hero wars triggered theirs? Or how I could prevent it from zooming out when I turn?



PS: I know it leaks, thats not my concern at the moment though.
 
Status
Not open for further replies.
Top