Home   Help Search Login Register  

Author Topic: Server VS. Client, what goes where?  (Read 1021 times)

0 Members and 1 Guest are viewing this topic.

Yabsa

  • Guest
Server VS. Client, what goes where?
« on: 07 Jan 2004, 00:21:30 »
I know the title of this thread is a little on the confusing side (and could possibly be in conflict with the rules of the forum, but I can't think of an adequate title for my question (sorry)).  Anyways, I'm working on a co-op mission, and, as the title may imply, I am confused as to what to execute on only the server, and what to execute on the clients.  When you use CreateVehicle, will running it on the server create the appropriate effect for all the computers (ie. will everyone see the same thing?), and if so, how would I go about running the command on the server?  (The comrefs I've perused seem to indicate this, but I would be happy if one of you confirmed it.)  Also, I want a considerabe, nay, absurd, amount of text radio (I love the Sidechat command), and the Comrefs tell me to "execute it on all computers", how would this be accomplished?  If there is a tutorial that explains this in a comprehensive fashion, point me to it.  Also, please inform me if I have violated any rules or conventions with this first post of mine, thanks.

deaddog

  • Guest
Re:Server VS. Client, what goes where?
« Reply #1 on: 07 Jan 2004, 01:34:31 »
To run code on the server only do this:

Create a gamelogic and call it "server".  It can be named anything but "server" just makes more sense.

Any code  you want to run on the server only do this:

?local server:whatever......

You can even put that as a condition for a trigger:
local server

or you can use
!local server

to make sure a remote machine runs it only.


Game Logics only appear local on the server, that is why this works.

Go here:
http://www.ofpec.com/editors/browse.php?category=1_4
« Last Edit: 07 Jan 2004, 01:36:51 by deaddog »

Yabsa

  • Guest
Re:Server VS. Client, what goes where?
« Reply #2 on: 07 Jan 2004, 01:54:17 »
Thank you very much for the reply, I'll see what I can do with this information.