• 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] 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,259
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