Jump to content
Sign in to follow this  
marcusm

MP & triggers - is their activation...

Recommended Posts

hello!

First, my question:

Does the server REALLY ALWAYS know the status of EVERY trigger ALL THE TIME?

The base of my question:

I wrote a spawnscript that creates enemies in a certain area

(condition: -> units from players side are in a triggers radius).

As so often, this works fine in SP or when i play alone in MP, but not always in real MP!

The script contains the typical '?!(local server):exit' - query

With the help of a friend(and his PC, of course smile_o.gif), i tested a little bit:

We were both in one team, my PC was the server(non-dedicated) and i was the group leader:

I will call my friend 'client' and myself 'CS' = Client&Server

1)CS & Client are placed ~10 meters in front of the trigger, CS runs in the trigger:

-> everything works as expected,

                enemies are created

2)CS & Client are placed ~10 meters in front of the trigger, Client runs in the trigger:

-> everything works as expected,

                enemies are created  

3) I placed myself(CS) ~ 5 kilometers away from the trigger and the client again in front of it(client runs in trigger)

-> NOTHING happens

After that, i rewrote a small part of the spawnscript so that fnSendServer(of the great CoC NS) is used to

grab the vars from the trigger and send them to the server.

Now when the triggers cond. is true, every client and ClientServer creates one instance of the spawnscript on the server.

I recreated the three scenarios:

1) works, but as expected, the enemies are created

twice(1x for my friends PC, 1x for myself)

2) same as above

3) curious: the enemies are created TWICE!

  I expected that the enemies are created ONCE! ->

  my friends PC, client: ->

        create one instance of the spawnscript on the server

   my PC(client-part): -> do nothing

   my PC(server-part): -> create enemies from my friends pc

 

I would appreciate it VERY MUCH if anyone has an idea/theory or just can/want say sth. to it!

Thank you very much for your time and for reading thru this quite large post!

Greetings

P.S.

Someone wrote in his signature:

'do not expect anything to work in MP' - maybe thats the solution? i don't think/hope so... tounge_o.gif

Share this post


Link to post
Share on other sites

hi!

it would be great if at least someone could say sth. about

the general behaviour of triggers in MP.

Thank you all again for reading my post!!

regards

Share this post


Link to post
Share on other sites

The problem is most people, even experienced in MP, are not 100% sure what to tell you.

I know that trigger contents and trigger times are not synchronized across MP. It is complicated...

Share this post


Link to post
Share on other sites

Hmmm, form what I get from your problem description you try to get some pretty standard stuf to work, so first of all my advise: DONT PANICK! The feeling of running into an unsolvable problem has occurred to most (if not any) scripter around. From personal experience I can tell you that it likely is something you overlooked...

But I am afraid that the tests you did are a bit unclear to me. First, what exacly is the difference of test 2 and 3? As I get it in both cases the CS and Client are NOT in the trigger to start with, and the Client runs into the trigger at start. The only diff. is that one time you are near and the other time you are far from the trigger.

Did I get this wrongly?

Another thing is that, if you whish, I am willing to look at the scripts in the mission itself. Any possibility to give it to me?

Cya, Pimmelorus

Share this post


Link to post
Share on other sites

Thank you both for your replies!

@Pimmelorus:

First, thanks for your encouraging words! biggrin_o.gif

Quote[/b] ]

But I am afraid that the tests you did are a bit unclear to me. First, what exacly is the difference of test 2 and 3? As I get it in both cases the CS and Client are NOT in the trigger to start with, and the Client runs into the trigger at start. The only diff. is that one time you are near and the other time you are far from the trigger.

...and thats the crucial point!

I don't understand why the server recognizes the trigger

activation in case 2 and NOT in case 3.

As you said, in both cases, the client activates the trigger

and the only difference is the distance between

trigger and clientServer.

If it is really ok for you, i would like to enlist your help...

I'd comment & format my code a little bit and PM you in a

few days(drowning in work @ job atm tounge_o.gif ). Would that be ok?

@bn880

yes, it seems illogical & complicated to me sometimes,

but luckily, there is your CoC NS.  wink_o.gif

I should try to build further missions on your NS from the beginning...

Thank you both again!!

regards

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  

×