Home   Help Search Login Register  

Author Topic: Scripting command regarding playernames.  (Read 1347 times)

0 Members and 1 Guest are viewing this topic.

Baphomet

  • Guest
Scripting command regarding playernames.
« on: 05 Dec 2002, 10:05:20 »
I would imagine there is one that allows either to specify a playername. I am trying to write a script which will display the name of a person in a multiplayer game if he triggers something.

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Scripting command regarding playernames.
« Reply #1 on: 05 Dec 2002, 18:38:14 »
Are you looking for this one?:

Code: [Select]
name object
Operand types:
    object: Object
Type of returned value:
    String
Description:
    Name of variable assigned to object in mission editor. In used on vehicle, name of first crew member (in order commander, driver, gunner).

Example:
    name vehicle player


~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

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:Scripting command regarding playernames.
« Reply #2 on: 05 Dec 2002, 21:47:46 »
Eg of trigger as seen in mission.sqm file

Quote
      class Item43
      {
         position[]={7365.412109,118.396111,4775.931641};
         a=300.000000;
         b=300.000000;
         activationBy="EAST";
         repeating=1;
         age="UNKNOWN";
         text="EWarning";
         name="EWarning";
         expActiv="Titletext[format[""%1 \n You are entering a West Safezone \n Turn around or die!"",name(thisList select 0)],""Plain down""]";
         class Effects
         {
            sound="Alarm";
            titleEffect="PLAIN DOWN";
         };
      };

Place this in the triggers activation field

Titletext[format["%1 \n You are entering a West Safezone \n Turn around or die!",name(thisList select 0)],"Plain down"]

This is a trigger that displays a warning on screen, naming the East player that activated the outer area trigger of the protected West respawn zone

the \n is a switch that enters the following text on a new line




Hope this helps
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

rchxenson

  • Guest
Re:Scripting command regarding playernames.
« Reply #3 on: 13 Dec 2002, 01:58:11 »
or this works too.....for salute and name....(when using camera)
ap1 being the name of that character

;point the camera at the ap1 and display name
_cam camsettarget ap1
_cam camsetrelpos [0,2,1]
_cam camcommit 6
~6
Titletext ["" + (name ap1),"PLAIN DOWN"]
ap1 playmove "EffectStandSalute"
~5

Pandoz

  • Guest
Re:Scripting command regarding playernames.
« Reply #4 on: 19 Dec 2002, 06:46:10 »
well if u want ur script to work on every1 playing then use the %1 for their name...that is just basically saying that whoever trips the triggers activation will have their name displayed.