Home   Help Search Login Register  

Author Topic: lock and group  (Read 618 times)

0 Members and 1 Guest are viewing this topic.

Offline Doolittle

  • Contributing Member
  • **
  • _this select 0
lock and group
« on: 05 Aug 2003, 16:32:59 »
If I lock a vehicle, does every client need to lock it?  If I change a unit to another group, does every client need to do this?  Can I getDammage from an object or does this just work for the server??

I really really wish someone would explain which commands MUST be run by all clients in order for it to "work".  For example, if you want to move a marker on everyone's computer, then everyone must move it themselves.  But if you wanted to move a flagpole, then only the client, or only the server needs to move it.

Help me please!

Doolittle

Offline Doolittle

  • Contributing Member
  • **
  • _this select 0
Re:lock and group
« Reply #1 on: 05 Aug 2003, 16:48:35 »
Same question with animations too....

Doolittle

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:lock and group
« Reply #2 on: 05 Aug 2003, 18:04:35 »
my understanding of dammage is

Player dammage is controlled by the player' client and then sent to the Server where it is then transmitted to all clients

Object dammage is controlled by the server and then transmitted to all clients

It would take a bit of time testing with some form of setdammage / getdammage script and a Hint "Status" script run Server side only or client side only to figure out exactly what was happening


As you already know It is possible to setdammage via a script to another player from your client, but thats about all you can do to him without creating a PV and having the Setdammage recipient knowledge he is the intended receipient for another command (This kinda throws out what i initially said so it must be some form of combination of the two and whatever reserved variables they use)

Wouldnt it be awesome if BIS released these reserved variables for us now :-)



I know this doesnt help much,  cant see anyone having ever sat down and worked this all out, except maybe the COC  crew when they made their network system
« Last Edit: 05 Aug 2003, 18:06:41 by Terox »
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

Offline Doolittle

  • Contributing Member
  • **
  • _this select 0
Re:lock and group
« Reply #3 on: 06 Aug 2003, 00:35:41 »
So I don't need to worry about sending damage values to everyone...but what about a vehicle's lock status?

Thanks for the help Terox.  ZEUS rules!

Doolittle

onepremise

  • Guest
Re:lock and group
« Reply #4 on: 06 Aug 2003, 20:04:59 »
Quote
If I lock a vehicle, does every client need to lock it?

I believe the lock command does notify other clients of its changes.  I dont think you will run into client/server issues using this.  I never have.

Quote
I change a unit to another group, does every client need to do this?

Nope, this can be done by the server or a single client.  The join command notifies other clients and the server of its changes.

Quote
Can I getDammage from an object or does this just work for the server??
setDamage and getDamage work for any client.  They do not have to be executed on all clients to set or get a status.  If you setDamage a vehicle on a client, it will be notified to other clients of its changes.

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:lock and group
« Reply #5 on: 07 Aug 2003, 02:07:57 »
By the way i tried locking a vehicle using a script and couldnt do it, so how do u do it


_vcl lock true using _vcl as _this select 0
or
Choppername lock true etc etc doesnt seem to work

I didnt test it much, but running it from the server didnt lock it,  I didnt try locking it clientside

instead i just used  "this moveInDriver C1" in the init field of the player i wanted as pilot and locked the vehicle in the editor

Now because i can lock it using the map editor but cannot lock it in a server side script, is it because my syntax was wrong or because the client controls this action

Using the editor this would assign values to the vehicle on every client from the client itself


Yes doesnt it get confusing.




« Last Edit: 07 Aug 2003, 02:18:49 by Terox »
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

Offline benreeper

  • Members
  • *
  • I'm a llama!
Re:lock and group
« Reply #6 on: 27 Aug 2003, 02:11:33 »
A script must run locally on the unit it is acting on, however, when that unit does something in the game world, everybody will see it.

Ben

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:lock and group
« Reply #7 on: 27 Aug 2003, 15:13:39 »
Just one thing i ever wondered

(not really important at the mo but maybe it becomes
important sometimes in the future)

Let's say a unit which is grouped to any client player's unit.

This unit would be local at given clients machine (SUMA
said this once)

If this unit runs a script from it's init field:

this exec "xxx.sqs"

a) how many scripts in summary would be running then?

would this script only run on the clients machine?

would it run on every machine?

would it only run on the server?

Also think about the possibility that all players would be in
the same group, and think about the same questions
above.

would there be then any difference in number of scripts
running?

Just asking this in case somebody might have thought about
it or would have had already experimented with that.

~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

Rubble_Maker

  • Guest
Re:lock and group
« Reply #8 on: 30 Aug 2003, 12:42:23 »
From what I know, "lock" and "unlock" are local, i.e. have to be called on each client. "getdammage" also works on the local machine only (this is a serious bug - if you have to query the damage value, do it on the local machine and send the values off to all others using PVs)