• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Spacebar - Is It Possible?

Status
Not open for further replies.
Hey guys, I am trying to make something original, I haven't seen it anywhere else, and I am starting to doubt that it cannot be made.

So, when you press space, it transfers your camera to the spacebar point, right?
I made a camera check which triggers every 0.01 seconds and it works.


But, is there any other way, GUI or JASS to detect when someone presses Spacebar?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,206
I made a camera check which triggers every 0.01 seconds and it works.
In single-player this is fine. However in multiplayer each time you query camera position the game needs to perform a synchronization operation for the camera position value which takes considerable time due to network traffic. Running every 0.01 seconds will mean 100 positions per player per second that need synchronization, so many that the game might be unable to cope and start to lag (not perform badly, lag).

Off-Topic: 1100th post :3
Newbie much? lol jk.
 
You can apply what DSG told you to about anything that does not need to be known by all players during runtime unless queried, like units currently selected. Player Red's Wc3 does not care for the units Player Blue currently has selected (unless units are being shared or something). The only time his instance of Wc3 will care is when the units currently selected by Blue are queried globally.

So yeah.
 
Status
Not open for further replies.
Top