itemsprite#
Inherits: sprite
Variables#
Functions#
Variable descriptions#
value ItemID (I_)
value ItemType (IC_)
Max number of itemsprites currently allowed.
Note: There is also a deprecated getter function ->Max(), which returns the same value. Prefer this variable.
The itemβs level
The starting tile of the itemspriteβs animation.
The secondary CSet used for flashing.
The number of frames in the itemspriteβs animation.
The current frame number that the animation is on.
The speed of the animation, in frames per frame.
The number of delay frames at the start of the itemspriteβs animation.
If the itemsprite is flashing or not. When flashing, it changes between itsβ CSet and FlashCSet.
value ItemPickupBitflags (IP_)
The item pickup bitflags.
If true, picking up the item does not play itβs usual pickup sound assigned in the item editor. Does not affect holdup sound.
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.
The 8 InitD[] arguments for the itemsprite script.
The timer that ASpeed is used with.
The message string to display upon picking up the item.
int PickupStringFlags π Source
value PickupStringBitflags (IPSTR_)
The bitflags associated with the pickup string.
The itemsprite script running on this itemsprite.
The dropset that this item was dropped by. Will be set for engine-dropped items, can be written by scripts as well.
Added in version 3.0.
If >-1, this ExState will be set when the item is collected, on the screen the item spawned on (sprite::SpawnScreen).
If set to true, the item will automatically be collected by the Hero as soon as possible.
Deprecated:
This is now just the internal engine ID, which is the same as doing
<int>some_sprite.
Deprecated: Exactly the same as Type, use that instead.
Function descriptions#
void Max(int value) π Source
Deprecated: Use Max instead!
Sets the max number of itemsprites allowed to a new value. Range
1-1024.
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.
Instantly deletes the itemsprite.
bool Switch(int effect) π Source
Switch the Hero with this sprite.
Valid values for effect: SwitchEffect (SW_EFF_) (SW_EFF_).
An active item on the screen.
Load with Screen->Items[], Screen->LoadItem(), or Screen->CreateItem().