itemsprite#

Inherits: sprite

An active item on the screen. See Screen->LoadItem() and Screen->CreateItem().

Variables#

int

Max

int

ID

int

Type

int

Family

int

Level

int

OriginalTile

int

FlashCSet

int

NumFrames

int

Frame

int

ASpeed

int

Delay

bool

Flash

int

Pickup

bool

NoSound

bool

NoHoldSound

untyped[]

InitD

int

AClock

int

PickupString

int

PickupStringFlags

int

Script

int

DroppedBy

bool

ForceGrab

const int

UID deprecated

int

SizeFlags deprecated

Functions#

int

Max() deprecated

void

Max(int value) deprecated

bool

isValid()

void

Explode(int mode)

void

Remove()

bool

Switch(int effect)

void

Own(bitmap b)

void

Own(paldata b)

void

Own(file b)

void

Own(directory b)

void

Own(stack b)

void

Own(randgen b)

void

OwnArray(untyped array)

void

OwnObject(untyped object)

Variable descriptions#

int Max ๐Ÿ”— Source

Max number of itemsprites currently allowed.


int ID ๐Ÿ”— Source

The item ID to give when the item is collected.


int Type ๐Ÿ”— Source

The type itemdata of the item. Uses the IC_ constants.


int Family ๐Ÿ”— Source

The type itemdata of the item. Uses the IC_ constants.


int Level ๐Ÿ”— Source

The itemโ€™s level


int OriginalTile ๐Ÿ”— Source

The starting tile of the itemspriteโ€™s animation.


int FlashCSet ๐Ÿ”— Source

The secondary CSet used for flashing.


int NumFrames ๐Ÿ”— Source

The number of frames in the itemspriteโ€™s animation.


int Frame ๐Ÿ”— Source

The current frame number that the animation is on.


int ASpeed ๐Ÿ”— Source

The speed of the animation, in frames per frame.


int Delay ๐Ÿ”— Source

The number of delay frames at the start of the itemspriteโ€™s animation.


bool Flash ๐Ÿ”— Source

If the itemsprite is flashing or not. When flashing, it changes between itsโ€™ CSet and FlashCSet.


int Pickup ๐Ÿ”— Source

The item pickup flags, as a bitwise flagset. Use the IP_ constants to access. Take care when using any INTERNAL flags.


bool NoSound ๐Ÿ”— Source

If true, picking up the item does not play itโ€™s usual pickup sound assigned in the item editor. Does not affect holdup sound.


bool NoHoldSound ๐Ÿ”— Source

If true, picking up the item does not play the screenโ€™s holdup sound. Does not affect the usual pickup sound assigned in the item editor.


untyped[] InitD ๐Ÿ”— Source

The 8 InitD[] arguments for the itemsprite script.


int AClock ๐Ÿ”— Source

The timer that ASpeed is used with.


int PickupString ๐Ÿ”— Source

The message string to display upon picking up the item.


int PickupStringFlags ๐Ÿ”— Source

The flags associated with the pickup string, as bitwise flags. Use the IPSTR_ constants to access this.


int Script ๐Ÿ”— Source

The itemsprite script running on this itemsprite.


int DroppedBy ๐Ÿ”— Source

The dropset that this item was dropped by. Will be set for engine-dropped items, can be written by scripts as well.


bool ForceGrab ๐Ÿ”— Source

If set to true, the item will automatically be collected by the Hero as soon as possible.


const int UID ๐Ÿ”— Source

Warning

Deprecated!


int SizeFlags ๐Ÿ”— Source

A flagset that determines how internal engine sizing of items is applied.

Values are ORd together, as follows:

Warning

Deprecated!


Function descriptions#

int Max() ๐Ÿ”— Source

Returns the max number of itemsprites currently allowed.

Warning

Deprecated! Use Max instead!


void Max(int value) ๐Ÿ”— Source

Sets the max number of itemsprites allowed to a new value. Range 1-1024.

Warning

Deprecated! Use Max instead!


bool isValid() ๐Ÿ”— Source

Returns true if this pointer points to a valid itemsprite. If this returns false, using any other value of this pointer will error.


void Explode(int mode) ๐Ÿ”— Source

Creates an explosion particle effect in mode 0, 1, or 2 of the sprite.


void Remove() ๐Ÿ”— Source

Instantly deletes the itemsprite.


bool Switch(int effect) ๐Ÿ”— Source

Switch the Hero with this sprite.

Valid values for effect: SwitchEffect (SW_EFF_).


void Own(bitmap b) ๐Ÿ”— Source

Grants โ€˜Ownershipโ€™ of the parameter object to the itemsprite.


void Own(paldata b) ๐Ÿ”— Source

Grants โ€˜Ownershipโ€™ of the parameter object to the itemsprite.


void Own(file b) ๐Ÿ”— Source

Grants โ€˜Ownershipโ€™ of the parameter object to the itemsprite.


void Own(directory b) ๐Ÿ”— Source

Grants โ€˜Ownershipโ€™ of the parameter object to the itemsprite.


void Own(stack b) ๐Ÿ”— Source

Grants โ€˜Ownershipโ€™ of the parameter object to the itemsprite.


void Own(randgen b) ๐Ÿ”— Source

Grants โ€˜Ownershipโ€™ of the parameter object to the itemsprite.


void OwnArray(untyped array) ๐Ÿ”— Source

Grants โ€˜Ownershipโ€™ of the parameter object to the itemsprite.


void OwnObject(untyped object) ๐Ÿ”— Source

Grants โ€˜Ownershipโ€™ of the parameter object to the itemsprite.