OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: aazell on 12 Jul 2003, 03:28:38
-
Hi all
I'm a little confused.
Could you please tell me if player units in MP games keep the unit name you set them or do they take on the name that they have set up themselves in the MP options of the game?
Example:
I place 8 us units as playable on my MP map.
I name them US1, US2, US3 etc...
I run a script and say US1 setdammage 1 to kill them.
The player has named themselves "aazell" in the multiplayer options of the game before they join.
Will the player names I assign to those playable units be overwritten by the players name?
If so I have to refer all my scripts to fetch the player name first and assign it a value correct?
Let me know
aaz
-
When you name the units in MP that name stick only for the unit in the editor. The name each player useas as there name, like me CLITCOMMANDER that will just show up for each player in the game. The name you assign each unitin the editor is there to refer for scripts and commands so if you name a unit g1 in the editor the command to kill him would be
g1 setdammage 1
it would go on for other units
g2 setdammage 1
that would kill the second unit not having anything to do with the players name who is the second unit. Hope that explains it ;)
-=CC=-
-
And to get you deeper into this stuff here's something more:
you can access units also by their player names:
e.g:
in a trigger's condition field:
name us1 == "CLITCOMMANDER"
onActivation: us1 setdammage 1
will kill the unit us1 only if it's CLITCOMMANDER ;D
or in a script:
?(name player == "CLITCOMMANDER"): player setdammage 1
would kill only the player CLITCOMMANDER ;D ;D
~S~ CD
-
Cool but can everyone stop saying that name. It's a bit dodgy.