Manual:DIL Manual/loadlevel
Jump to navigation
Jump to search
Contents
loadlevel
Field (integer, read-only; on a zoneptr).
z.loadlevel : integer
The level a god needs to load objects and NPCs from the zone, unless the god's name is in the zone's creators. It is the fifth column of vme/etc/zonelist; smaller numbers, and a missing one, are raised to 200 (IMMORTAL_LEVEL), so it is never below that.
Notes
- It only limits the
loadcommand. DIL'sload()doesn't check it. - It can't be assigned (vmc: "Illegal lvalue").
- On a null zoneptr it fails.
Example
dilbegin integer may_load(pc : unitptr, zonename : string);
var
z : zoneptr;
code
{
z := findzone(zonename);
if (z == null)
return (FALSE);
if (pc.level >= z.loadlevel)
return (TRUE);
return (pc.name in z.creators);
}
dilend
Tells whether a god may load units from a zone, as the load command decides.