Home   Help Search Login Register  

Author Topic: Locality of camCreated logic and emptydetector  (Read 1643 times)

0 Members and 1 Guest are viewing this topic.

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Locality of camCreated logic and emptydetector
« on: 07 Sep 2006, 20:05:04 »
I presume that camCreated logics and empty detectors are local.  Can someone please tell me if this is so?
urp!

Offline Igor Drukov

  • Contributing Member
  • **
  • Conscientious Subjector
Re: Locality of camCreated logic and emptydetector
« Reply #1 on: 07 Sep 2006, 22:17:01 »
I no longer use camCreate personnally, so I'll just stick to what I know:

CreateVehicled objects - not only Logics, but not units, who depend on the locality of their leader -  are local to the client that creates them. I don't know about EmptyDetectors, I've never felt the need to carry out any tests on them. I would assume they are local to where they're created too.

Offline Dinger

  • Contributing Member
  • **
  • where's the ultra-theoretical mega-scripting forum
Re: Locality of camCreated logic and emptydetector
« Reply #2 on: 13 Sep 2006, 13:23:07 »
Igor's talking about locality (being-in-absolute, vs. being-with-respect-to-another). If that's what you're looking for, you have his answer.

I think you're talking about existence in any sense.
Interesting question, which could be formulated this way:

Camcreated Shells only exist to the client they are created on. (but their damage is felt across the network)
Camcreated Vehicles don't work like regular vehicles (Diminished being), but exist to all clients.
EmptyDetector and Logic are technically vehicles, but can't be seen. So do they exist all clients?

My gut feeling is that they probably do have some sort of existence on other clients. But it should be tested. The test would look like:

Having a game logic entitled "server"
Code: [Select]
init.sqs
~.1
?local server:goto "serverSide"
#clientSide
@Transmitted
player sidechat format ["OBJECT %1 is a %2 at %3", TransObject, TypeOf Transobject, getpos TransObject];
exit

#serverSide
TransObject = "Logic" Camcreate [random 10, 666, 0];
publicVariable "TransObject"
Transmitted = true
publicVariable "Transmitted"
Run two instances of OFP on the same box, and test that out.


Oh, and camCreate is still useful for things. If you're creating lots of ammo simulations (for example, simulating clusterbombs), it's much more effective to camcreate "the real deal" on the server, and camcreate duds on the clients (spoofing), then to createVehicle a whole bunch of shells at once (=prevents desync issues). Also, watch out for the guys who use createvehicle for such effects and then ignore locality -- createvehicling each explosion on each client (="Desync Bomb").

Dinger/Cfit