OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: keou on 31 Oct 2003, 19:27:13

Title: getpos player....
Post by: keou on 31 Oct 2003, 19:27:13
if i use "getpos player" in a SP game, what would be used to signify multiple players in a MP game?  (what would i use for getpos player2)


****wait****
player

Type of returned value:
Object
Description:
person controled by player. In MP this value is different on each computer.

Example:
alive player
************

does this mean in MP it is basically unknown to scripters at all??
Title: Re:getpos player....
Post by: Spinor on 31 Oct 2003, 20:02:36
Not completely, at http://www.thechainofcommand.net/cgi-bin/ikonboard/ikonboard.cgi?s=158b985eba1c26c4e539ad67ce6319cf;act=ST;f=17;t=25 (http://www.thechainofcommand.net/cgi-bin/ikonboard/ikonboard.cgi?s=158b985eba1c26c4e539ad67ce6319cf;act=ST;f=17;t=25)
you can find CoC's Network Services which among many other things (like sending data of almost
any kind from one machine to another) provides you with an array of players.

If you have control of your own mission you can of course give each player unit its unique name
and refer to that.
Title: Re:getpos player....
Post by: Doolittle on 31 Oct 2003, 20:03:02
Whichever client is "running" the script that says "player" in it, then that will be THEM.  So if Joe is running the script, player == Joe...and Mary runs the script too, then player == Mary.

If you want to reference other players, you would need to name them in the game editor.  When you place a soldier in the editor and make it Playable, make sure to name it, like player1 or player2, etc.  Then use these names to access those objects.

Doolittle
Title: Re:getpos player....
Post by: keou on 31 Oct 2003, 21:51:59
gottcha.

this'll change things a bit  :)

thanks for the leads!