'LinKin Posted September 8, 2014 Share Posted September 8, 2014 Hello, When I press a certain key, a HS rocket is launched towards the player that I had locked as my target previously. It works fine, but, the misile isn't 'sync' with the target's (player) screen. If I shoot the misile, I see it going towards my target, normally. But the other player (my target) just sees the rocket going straight, he doesn't see it coming towards him. But still it hits him and he gets damaged, he can also see the explosion on his car when the misile hits. Can I make it so that in the other player's screen, the misile behaves like it should do? (going towards him). May be this a 'bug' from MTA? Thanks. Link to comment
Saml1er Posted September 9, 2014 Share Posted September 9, 2014 Attach an object ( diable the collisions of the object using setElementCollisionsEnabled(object,false) ) to the rocket that was launched. I'm not sure if this will help but you can try. Link to comment
myonlake Posted September 9, 2014 Share Posted September 9, 2014 Projectiles are not synchronized, nothing you can do about it, unless you want approximate calculations and more synchronization problems. Link to comment
'LinKin Posted September 9, 2014 Author Share Posted September 9, 2014 But, why are the HS rockets launched by the HS Rocket Launcher weapon syncronized? Also, if I launch a normal rocket from the car, the rest of the players can see it normally.. The trouble is for HS rockets only Link to comment
myonlake Posted September 9, 2014 Share Posted September 9, 2014 (edited) Non-HS rockets have a static travel distance and the end point is calculated by the script when triggered, that can be synchronized from the start and end point. HS and other dynamic rockets do not come with this because who is going to synchronize it? You can manipulate anything, meaning the synchronization would never be reliable, especially because there is not always someone to synchronize it. Server cannot synchronize these things. Edited September 9, 2014 by Guest Link to comment
Moderators IIYAMA Posted September 9, 2014 Moderators Share Posted September 9, 2014 The server can synchronize it(serverside >client), except the rocket will never hit anything. The only information the server got, is the streamed element information. So it got disabled most of the time. Link to comment
'LinKin Posted September 10, 2014 Author Share Posted September 10, 2014 So it will never be synchronized for all the players.. Link to comment
Moderators IIYAMA Posted September 10, 2014 Moderators Share Posted September 10, 2014 Well that depends, everything can be done with lua. You can do the coll checks after the rocket path has been created and during the flying. So yes it is not impossible and high ping maybe annoying. But that is just what it is. Link to comment
myonlake Posted September 10, 2014 Share Posted September 10, 2014 As I said, approximate calculations, and more synchronization problems Link to comment
Moderators IIYAMA Posted September 10, 2014 Moderators Share Posted September 10, 2014 yea, a few smart calculations. About synchronization problems. One of the players will be the syncer, this player will be the one who is going to download and upload with no delay, so it has a little impact at his own network traffic.(and if he lose connection, you can abort the projectile or synced it by somebody else) But for the other players in the server, the projectile is just an effect. Which means if the network can't handle the traffic, you have the choice: send the packet or don't send the packet. Synchronization problems are manage able, if you know how and what functions you have to use. an interval of 300 ms is suit able for the syncer and an interval for other players can be handled with 600 ms. and the reason why I said this all is because circa 7 months ago I started building it, but I never finished it because I started with another resource and I was to lazy to develop it further. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now