Re: Client/server cog stuff


[ Follow Ups ] [ Post Followup ] [ The Massassi Temple Message Board ]

Posted by RBF on November 01, 1998 at 21:31:06:

In Reply to: Client/server cog stuff posted by Kenobi on November 01, 1998 at 21:15:49:

: Can someone provide a easy explanation on how to use the Client/server cog's that seem to be the hot set up. I just bata tested a Mot's MP level and when I used the C/S cog it worked fine for me but did not affect the other person playing. any help please. BTW thanks to Nathan B. for the bata testing, cool beans bud.

The Code Alliance has docs on this. I haven't read them in a while, so this might be redundant, but here goes.

Client/server cogs take one cog (like a door cog) and split it into two. There would be one cog that would run on the server (in the case of the door, a cog to activate the switch) and that cog would send a trigger to all other cogs when the event occured (when the surface was activated). Something like:


activated:
SendTrigger(1234, 0, 0, 0, 0);
return;

(that's not very detailed, in case you can't tell)
Now, every cog with a trigger: messge will do whatever its trigger: message says when this is done, so in the client cog (with flags 0x240) you have

trigger:
If(GetSenderRef() == 1234)
{
door code here
}

(I'm not sure if it's getsenderref or getsourceref...check the Code Alliance docs.)
anyway, that probably didn't help, but if you don't have a local cog with the trigger stuff in it to do the effects, then it's not going to work right. (hopefully Pele will stop by and actually explain this)
--RBF




Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ The Massassi Temple Message Board ]