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

Camera Loop

Status
Not open for further replies.
Level 3
Joined
Nov 3, 2015
Messages
42
Hello everyone!

To start, I only have two camera commands: "-cam", and "-setcam". The "-cam" command works perfectly fine, nothing wrong there; the "-setcam" command is where the issue is.

I want "-setcam" to be an advanced camera command where a player can permanently keep the camera height at the real number they set it to. Scrolling would bring them back to default camera view for a moment before snapping back to where they set it to (preventing it from going to default is better!). If the player were to use the "-cam" command with "-setcam" active, the loop will stop and the camera will be brought to the target point "-cam" set.

Search came up with nothing.

Any help is greatly appreciated.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Periodic trigger (eg fires every second) that resets the player camera each time it fires. Players who use -setcam are added to a player group which is used by that periodic trigger to set player cameras. If the player group is empty, turn off the periodic trigger, otherwise if it was empty but has 1 player added to it, turn on the periodic trigger. The -setcam command adds the triggering player to the player group while the -cam command removes them from it.
 
Status
Not open for further replies.
Top