Home   Help Search Login Register  

Author Topic: Works in Editor, Not in CoOp  (Read 1653 times)

0 Members and 4 Guests are viewing this topic.

Offline tuskawilla

  • Members
  • *
  • I ain't got time to bleed!
Works in Editor, Not in CoOp
« on: 04 Jul 2009, 23:34:33 »
Hi all, long time player of OFP and been doing maps for a few years in my spare time.

I am working on a map in which I start out with my squad in a truck "this moveincargo truck1" for each of the men.  The truck arrives at it's Unload Cargo waypoint, which is synced with the unit's Unload waypoint. 

Now in the map editor, i test the map out, when we arrive, I as squad leader am kicked out of the truck, I then order the rest of the squad out and they get out of the truck.

But when I export this to multiplayer and play it, the truck arrives, I have to get out on my own and when I order the troops out of the truck, they will not get out of the truck.

So that's my delima, what the heck is my problem?

Also to note, I am using the Invasion 1944 Demo mod and a number of ww2 models specific to the 1944 mod.  It is a winter '44 axis/allied mission.

Offline Baddo

  • Former Staff
  • ****
  • Reservist Jaeger
Re: Works in Editor, Not in CoOp
« Reply #1 on: 24 Jul 2009, 20:30:01 »
I'm pretty sure it is some sort of a locality issue.

In multiplayer it sometimes matters if your code is executed on all computers in the session, or on the server only or on the clients only.

In Operation Flashpoint you can use a gamelogic and the local command to determine whether the machine executing the code is the server.

Example:

- added a gamelogic with the name Server to the mission

Code: [Select]
? !(local Server) : exit
That line of code will check if the gamelogic 'Server' is local and if it is, then we know this is the server running the script. If not then the 'exit' command will do what is obvious.


In Armed Assault the gamelogic is unnecessary as there is a scripting command to deal with this, isServer.