Jump to content
Sign in to follow this  
Luft08

Mission creation for dedicated servers

Recommended Posts

Are there any steps I need to take to create a multi-player mission for a dedicated server?

 

The reason I ask is because I have made a MP mission that runs fine from my PC but has anomalies when run from a dedicated server.

 

End mission triggers sometimes don't fire. Sometimes things from the previous mission show up in the newly generated mission. (My code generates a mission from about a half dozen scenario types. i.e. "Destroy the Cache", "Destroy the Convoy", "Hunt the AA", etc.) Once convoy markers from the previous mission were displayed on a destroy the weapons cache mission.

 

Thanks. 

Share this post


Link to post
Share on other sites

you will need to learn about locality, which is basically where code needs to be run relative to the objects it is referencing

The command ref defines where code should be run, eg locally to the object only or on any machine, server only etc

You will also need to learn about the various switches that can be used to filter where the code is run, such as  

Isdedicated

IsServer

HasInterface

 

This is a steep learning curve until you grasp the concept and start understanding locality issues

  • Thanks 1

Share this post


Link to post
Share on other sites

For this type of situation you want to perform all the critical things related to mission flow on the server, and never on the client.


If something must be triggered by a client action, then you must send message from client to server so that the server performs actions.

 

For your case, the 'mission generation' must happen on the server.

 

Then you will not have to deal with any locality issues related to global mission-wide resources, such as AIs or global markers.

 

For things which must happen only on client's machine (manipulating UI, playing sound on client, local markers, ...) you must do the same: send message from server to client(s), so that some code is executed locally on client.

 

Key for all this is remoteExecCall command, which you must learn how to use, it's great for handling these situations.

  • Thanks 1

Share this post


Link to post
Share on other sites

Thank you for helping me get a grip on this.  I find Arma to be incredibly powerful although confusing at times. The only reason I am making such good progress is because of forums like this and the great community that show such a devotion to helping others learn.

 

Thanks again.

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×