| 07-10-2003, 02:29 AM | #1 |
In the workings for the FPS mod I have a problem that needs solving. I'm attempting to detect a units Z location using the targetzof camera however I haven't found a way to implement it for multiplayer. It can only detect targetZofCurrentCamera. I attempted at a few script approaches but couldn't get the ForPlayer to work or making it detect a camera objects targetZ. So all I need is to detect individual player current z or a cam objects. Any suggestions? thanks. *edit* come to think of it, in order for my firieng trigger to work against none human controlled units I'll need to detect that units z as well. This mean I'll definitely need to detect the TargetZ of a camera object. Unless someone can think of a diffrent way to detect z. |
| 07-10-2003, 07:22 AM | #2 |
The problem is that the camera information is local only. That means the other computers don't even have that information. And since the script runs on every computer the camera information needs to be present for each. I have made a function to sync that information using the selection of that player. Unfortunately there is a certain delay before a selection done by trigger can be read so this method is rather slow. By sending only some of the bits you can make it faster though. If you want to give it a try, search for SyncInteger on this forum. You can see it in action in the Commander of AMAI, The Attack here command uses this in multiplayer. |
