Home   Help Search Login Register  

Author Topic: Scripts in multiplayer  (Read 1311 times)

0 Members and 1 Guest are viewing this topic.

Uldics

  • Guest
Scripts in multiplayer
« on: 21 May 2004, 19:56:55 »
As I understand, all scripts are simultaneously starting on all computers - players and server and then running independent and redundant. Why is it necessary to waste such ressources and run them at all places same time? Why can't that just be that all scripts run only on the server? Then there wouldn't be any problems with createvehicle and so on, which has to be done only at one place.

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Scripts in multiplayer
« Reply #1 on: 21 May 2004, 21:16:24 »
What's your problem here?

If you know how to make mp missions it's up to you, where
you want your scripts to be running.

In some cases it's better to have them running locally for
each client and in other cases it's fine with them running server
side only?

Still: where a script is running is up to the guy who made that
mission (expecting he knows what he's doin)

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Offline Zombie

  • Members
  • *
  • Beware the night, the zombie walks among you
    • USI
Re:Scripts in multiplayer
« Reply #2 on: 22 May 2004, 13:48:30 »
exactly, you can control where script are run, like this:

make a game logic called   server

then in your script you want only run on the server put this line:
?!( local server): exit

Uldics

  • Guest
Re:Scripts in multiplayer
« Reply #3 on: 26 May 2004, 14:47:49 »
Then I have to ask more precise: how do I find out, which scripts have to run on only server, only client, only all clients, all places?

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:Scripts in multiplayer
« Reply #4 on: 26 May 2004, 15:37:13 »


questions you should be asking yourself are

1) Does the client need to run this script
2) Does the server need to run this script

Server doesnt require anything graphical to be run on it, eg dialogues, special effects such as heli dust etc etc

Server should control vehicle respawn, and keep a tally on the scores
weapon selection systems, player respawn etc needs to be run on clients only

Never trust a client to store important data, have the client send it to the server

AI control is serverside

hope that gives you an idea.

Every script is different, some are client only, some are server only, some are player only, some are mixed


lines you should be using are

?(Local server):
?!(local server):

?(local player):
?!(local player):

you can have scripts run on both server and clients, and have certain lines not read by cliewnts or server using the above lines

also use the above lines to execute scripts on the machine you want them, or to exit from scripts for the machines thast you dont want them to run on etc etc etc

Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123