Home   Help Search Login Register  

Author Topic: How to do multiplayer scripting?  (Read 2538 times)

0 Members and 1 Guest are viewing this topic.

Offline haroon1992

  • Members
  • *
  • My life is hopeless...
How to do multiplayer scripting?
« on: 08 May 2010, 15:34:18 »
I need some advice on creating multiplayer script.

-The dos and don'ts of multiplayer scripts..

-Co-op scripting..

-Assigning a variable value to a specific player and updating that variable so that the variable is the same for all other players.I am saying about making a variable become GLOBAL.
(For example, player1 has got a Truck and the variable "truck" is now 1..... and that variable should also be 1 for all other players..... I.E if they call out the status screen (just a custom dialog),they'll see that player1 has 1 Truck)

-About the SetVariable command and GetVariable command and how to use them.(The command reference lacks sufficient information about these command)

- A simple example describing how to update a variable and how to make it global.
- Another example of a very very simple revive script.(player fall unconscious for sometime and then gets back on feet)

(I've posted similar threads on this site AND/OR other websites but it was ignored by others,I hope people pay attention this time)

Good Luck for everyone,
Sincerely,
Haroon1992



Very busy with life, business, and other stuff. Away from OFP for months. Not sure if I could get back onto it. :(

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: How to do multiplayer scripting?
« Reply #1 on: 08 May 2010, 15:49:33 »
Well, maybe the OFPEC MultiPlayer Scripting Tutorial helps you ;)
It's done in early ArmA1 time but as far as I know most of it still holds.
Also the BIS Community Wiki most likely holds good info on these things too..

As for set/getVariable I don't think they need any special handling in MP, at least I have not had any problems with them using them like in SP (I'm far from being any good in MP scriptign though). I guess you just need to remember to set the global switch to true so that JIP players get the variables when joining :dunno:
Code: [Select]
blah setVariable ["blahvariable",234,true];
« Last Edit: 08 May 2010, 15:51:40 by h- »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.


Offline haroon1992

  • Members
  • *
  • My life is hopeless...
Re: How to do multiplayer scripting?
« Reply #3 on: 09 May 2010, 14:27:00 »
So you mean there is no one in this community who is proficient in multiplayer scripting....or is there any professional multi-p scriptors in this forum?

I always get confused by the references that people gave me.
I just wanted the answer right here on this thread.........

Sorry if anything becomes an offense to anyone......
With Lots of Hopes,
Haroon1992
Very busy with life, business, and other stuff. Away from OFP for months. Not sure if I could get back onto it. :(

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: How to do multiplayer scripting?
« Reply #4 on: 09 May 2010, 15:19:46 »
Quote
I just wanted the answer right here on this thread

 :dry:

This is a voluntary Community. It's unlikely that anyone has the free time to hold your hand through something as complex as learning Multiplayer editing. The links provided above lead to resources which have been created to help you learn. A lot of time and effort went into creating those resources. Is it too much to ask that you spend some of your own time reading and learning from them?

Offline fleepee

  • Members
  • *
  • Enter the Matrix!
Re: How to do multiplayer scripting?
« Reply #5 on: 09 May 2010, 20:05:10 »
I was thinking the same things... :D

Offline Ironman

  • Former Staff
  • ****
    • {GSF} Home Page
Re: How to do multiplayer scripting?
« Reply #6 on: 10 May 2010, 01:30:50 »
The biggest thing to know for multiplayer scripting is whether or not you want a scipt to run on a Server, Client, or both. This is called the scope. As long as you get the scope right you could be using script from single player missions and they should run just fine.
TS3 IP: tor.zebgames.com:9992

Offline haroon1992

  • Members
  • *
  • My life is hopeless...
Re: How to do multiplayer scripting?
« Reply #7 on: 10 May 2010, 15:53:31 »
Really very very sorry guys.......
it's my fault..
Very busy with life, business, and other stuff. Away from OFP for months. Not sure if I could get back onto it. :(

Offline Inkompetent

  • Members
  • *
Re: How to do multiplayer scripting?
« Reply #8 on: 11 May 2010, 00:38:19 »
Also in the command reference (be it here on the BIS wiki) you can see if commands are local or global, and if the effect of the command is local or global, and (practically) every existing script command has that information written for it, so that one knows at which machines the command has to be run.

That, and the by kyu linked pages, are about the best information one can get aside from read other peoples' scripts.

Offline haroon1992

  • Members
  • *
  • My life is hopeless...
Re: How to do multiplayer scripting?
« Reply #9 on: 11 May 2010, 14:28:41 »
I found the following line on BI Page
    Note: All static objects are local everywhere.


I have a question,
if I blow up a building in MP, will it affect other players?(ie will that building fall down in other client's computer?)
Very busy with life, business, and other stuff. Away from OFP for months. Not sure if I could get back onto it. :(

Offline Loyalguard

  • Former Staff
  • ****
Re: How to do multiplayer scripting?
« Reply #10 on: 11 May 2010, 15:56:54 »
If you blow it up with a weapon, yes. If you use setDamage, probaly no unless you use setDamage on every machine (including the server and JIP players). My tests with setDamage indicate it is local only.