Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Latest commit

 

History

History
161 lines (96 loc) · 4.43 KB

Item.rst

File metadata and controls

161 lines (96 loc) · 4.43 KB

Item

datablock for common properties.

Inherit:

ShapeBase

Description

Base Item class. Uses the ItemData datablock for common properties.

Items represent an object in the world, usually one that the player will interact with. One example is a health kit on the group that is automatically picked up when the player comes into contact with it.

Example:

// This is the "health patch" dropped by a dying player.
datablock ItemData(HealthKitPatch)
{
   // Mission editor category, this datablock will show up in the// specified category under the "shapes" root category.
   category = "Health";

   className = "HealthPatch";

   // Basic Item properties
   shapeFile = "art/shapes/items/patch/healthpatch.dts";
   mass = 2;
   friction = 1;
   elasticity = 0.3;
   emap = true;

   // Dynamic properties used by the scripts
   pickupName = "a health patch";
   repairAmount = 50;
};

%obj = newItem()
{
   dataBlock = HealthKitSmall;
   parentGroup = EWCreatorWindow.objectGroup;
   static = true;
   rotate = true;
};

Methods

Fields