Home   Help Search Login Register  

Author Topic: Using "PLAYER" in scripts/triggers  (Read 947 times)

0 Members and 1 Guest are viewing this topic.

Dagon

  • Guest
Using "PLAYER" in scripts/triggers
« on: 06 Sep 2005, 05:43:58 »
Is using "PLAYER" in a script or trigger a 'safe' practice, or should I instead name the player's instance (how's PC sound? Player character. har.) and refer to it by the instancename instead of PLAYER?
« Last Edit: 06 Sep 2005, 05:48:15 by Dagon »

CrashnBurn

  • Guest
Re:Using "PLAYER" in scripts/triggers
« Reply #1 on: 06 Sep 2005, 07:51:45 »
Not sure about multiplayer but no problem for single player. In fact, even if you name the player, you can still use "player" in triggers and scripts.  ;)

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Using "PLAYER" in scripts/triggers
« Reply #2 on: 06 Sep 2005, 07:52:40 »
I am sure opinions will vary on this.  

I use the name of the character in all the cutscenes, but I use 'player' in all the scripts.  That way when I am testing a mission I can play as a temporary unit that might have more/different equipment than the player character and the scripts will still work because this temporary unit is now the player.  The one gap in my knowledge on this is Muti-Player.  I have written no scripts for MP missions so I cannot say how player is treated there.

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re:Using "PLAYER" in scripts/triggers
« Reply #3 on: 06 Sep 2005, 08:24:22 »
In MP player its a variable that exists on all clients. If a global script issues a command affecting player, it will affect all human players in a MP-game.

In a local script it will only affect the player on the client running the script.

OFPEC | Intel Depot
RETARDED Ooops... Retired!

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Using "PLAYER" in scripts/triggers
« Reply #4 on: 07 Sep 2005, 01:42:29 »
As far as I know it's good practice... I use it all the time ;)

The only exception is in intro or outros, the code:

name player

Doesn't work, you have to name the unit and use:

name unit

instead...

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Using "PLAYER" in scripts/triggers
« Reply #5 on: 07 Sep 2005, 10:01:51 »
I don't use it.  It means you can't test the mission as any other unit.
Plenty of reviewed ArmA missions for you to play