Manual:DIL Manual/names
Jump to navigation
Jump to search
Contents
names
Field (stringlist, read/write; units: all; also on an extraptr).
u.names : stringlist e.names : stringlist
On a unit: the names players use to refer to it, such as {"big green dragon", "green dragon", "dragon"}. The first one is the unit's name.
On an extra description: the keywords it answers to. In extras the game keeps for itself (names starting with $) the rest of the list often holds data; comm.zon keeps a player's ignore list and tell history this way.
Notes
- Assigning a stringlist replaces all the names with a copy of it; assigning null empties the list.
- The list can also be changed in place with addstring(), substring(), insert() and remove(), and read with
u.names.[i]. .namecan't be assigned; change the first entry of.namesinstead.- On null it fails.
Example
dilbegin disguise();
var
old : stringlist;
code
{
old := self.names;
self.names := {"hooded stranger", "stranger"};
act("$1n pulls up a hood.", A_ALWAYS, self, null, null, TO_ROOM);
heartbeat := PULSE_SEC * 60;
pause;
self.names := old;
act("$1n lowers the hood.", A_ALWAYS, self, null, null, TO_ROOM);
quit;
}
dilend
Gives an NPC other names for a minute and gives the old ones back; stringlist variables keep their value across the pause.