Home   Help Search Login Register  

Author Topic: Basic MP editing Q's  (Read 1258 times)

0 Members and 1 Guest are viewing this topic.

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Basic MP editing Q's
« on: 26 Sep 2004, 23:09:25 »
Ok, I've never done any MP editing, but I really need to learn. I've read snYpir's intro to MP editing, so I understand the basic concept of scripts running separately on each client, variables being local only to that client unless you use the global command, and how to make scripts only run on the server. But I still have a couple Q's that the tut didn't seem to answer. My main question is:

If you use a command that affects the 'game world' (i.e. setdammage, move, setbehavior, etc), does it matter what computer that command is run from? So, what would happen if I had a unit named 'bob', and on ONE client's computer, I scripted "bob setdammage 1"? What if I did the same thing on the server, or what if I did it at the same time on all computers?

Actually, this one Q has been keeping me from getting into MP editing. I know a few commands are only local to one computer, like camcreate and drop, but other than that, I don't know about the rest of them. TIA.

HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Offline Platoon Patton

  • Members
  • *
  • "Barbecue" CreateVehicle getpos LLama
Re:Basic MP editing Q's
« Reply #1 on: 27 Sep 2004, 21:15:53 »
Quote
If you use a command that affects the 'game world' (i.e. setdammage, move, setbehavior, etc), does it matter what computer that command is run from?

If your local command affects the global batllefield U have to inform the server,and he will inform the other clients.

Quote
So, what would happen if I had a unit named 'bob', and on ONE client's computer, I scripted "bob setdammage 1"?

Depends if Bob is the local player or not.If Client A for some reason (maybe illegal kill) wants to sedammage 1 Client B,he has to give that command to the server (PV),and the server will give that info to the others and kill Client B.
If you are unit Bob then the local script will kill you and the game will deal with that info.

Quote
What if I did the same thing on the server?
Thats the way to do it,put it in a global space or make it global.

Quote
or what if I did it at the same time on all computers?
As long as they all inform the server no prob...
Well you could say that they would have all the same info if you do it on all clients,but the server wouldnt know.What if U have a local action,as the result of a local event?(EH that activates local to the player).How would u give the info to the other clients?Indeed,through the server,and he will pass this to the others.

Sorry if I make some spelling errors (I am not English),and I try to understand the system also,could be wrong in some things tho.I think some experienced MP-scripters could help U more on this (Like Terox-Tactician)Also The ECL MP template is also a good instrument to take a look at.Lets find the truth together General :)
http://www.platoon-clan.com/ We always wellcome dedicated OFP players :)

http://www.european-combat-league.com/index.php To play with us in the best OFP league ;)

Offline Sentinel

  • Contributing Member
  • **
  • World is tough and I'm tougher!!
Re:Basic MP editing Q's
« Reply #2 on: 30 Sep 2004, 22:59:17 »
Well, I had similar probs just few days ago with MP scripting. I came uÂ'p with the idea that calculative scripts should be executed only on server and the server would make the result public.

I made a loop which is ran on all clients. This loop waits until server gives info that variable is true and then executes script with arguments the server has computed. Haven't yet been able to test it, though, but few friend of mine said that in theory it should work.