Jump to content
COL Alexander

Multiplayer logic help (Land Nav course)

Recommended Posts

Hi, This is my first MP script attempt and I'm having a little trouble coming up with a gameplan for coding. I'm creating a Land Nav script...works SP and now trying to convert to MP. Here is the summary:

 

1. Player initiates Land Nav course via addAction() scrollwheel

2. Server generates a unique land nav course by choosing random from pre-set points in an array (must be initialized somewhere)

3. Player receives grid coords which are added as a task

4. Player runs off and finds a point...logs it via addAction()...possibly unlogs it also if they change their mind

5. After finding all points player returns to start and finishes course via AddAction() option

6. Point names are compared to the answer key and player receives a score

7. Multiple people can be doing this at the same time...all with unique courses

 

I am having trouble coming up with the MP logic/gameplan for the coding. Here are my questions:

 

1. What is the best way to pass the grid coord data from the server to the client (and back to server at the end)? Grid coords and logged points will be stored in an array.

2. Where should I initialize my master list grid coords (contains the coord and the alpanumeric designator)...it's the answer key

3. How can I ensure the answer key from #2 is hidden from the client and not in plain text in a client-side script file?

 

I think this is simple but w/o experience in MP scripting I'm still lost. Short example code would be great! Thanks.

Share this post


Link to post
Share on other sites

I dont exactly understand your mission but i think thats not the important thing.

 

you could take a look at these commands to transfer your data:

publicVariable

publicVariableServer

publicVariableClient

 

if you want a more or less safe method for your third question then you need to create a server side mod where the key is stored in.

 

if it can be less safe then you can encrypt the key file and decrypt it on runtime. but without a server side mod is the problem that your encryption method can be read in your scripts by anyone and can be used to decrypt your key file.

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

×