Item Functions

From Danmakufu Wiki
Jump to: navigation, search

CreateItemA1

Arguments:
    1) type
        ITEM_1UP     ITEM_1UP_S    : life
        ITEM_SPELL   ITEM_SPELL_S  : bomb
        ITEM_POINT   ITEM_POINT_S  : point
        ITEM_POWER   ITEM_POWER_S  : power
        ITEM_USER                  : user-defined (add item constant to get desired item)
    2) x-coordinate
    3) y-coordinate
    4) scoring
Return Value
    Object ID

Creates an item at the specified points. The types ending in "_S" will create a smaller version of the specified item. "scoring" is the value the spawned item will add to your score.

CreateItemA2

Arguments:
    1) type
    2) x-coordinate
    3) y-coordinate
    4) x-coordinate destination
    5) y-coordinate destination
    6) scoring
Return Value
    Object ID

Same as CreateItemA1, except now it will quickly move towards the specified coordinates before slowly falling down.

CreateItemU1

Arguments:
    1) Item ID
    2) x-coordinate
    3) y-coordinate
    4) scoring
Return Value
    Object ID

Creates an item much like CreateItemA1, however it will spawn a user-defined item associated with the specified ID.

CreateItemU2

Arguments:
    1) Item ID
    2) x-coordinate
    3) y-coordinate
    4) x-coordinate destination
    5) y-coordinate destination
    6) scoring
Return Value
    Object ID

Creates an item much like CreateItemA2, however it will spawn a user-defined item associated with the specified ID.

CollectAllItems

Makes all items fly towards the player.

CollectItemsByType

Arguments:
    1) type

Makes all items of the specified type fly toward the player.

CollectItemsInCircle

Arguments:
    1) x-coordinate of the center of circle
    2) y-coordinate of the center of circle
    3) radius of the circle

Makes all items within the circle fly toward the player.

CancelCollectItems

Cancels any items that were currently moving to the player for collection. This only appears to work for items collected by the player auto item collection line (SetPlayerAutoItemCollectLine).

StartItemScript

Arguments:
    1) script path

Starts the script for processing user-defined items.

SetDefaultBonusItemEnable

Arguments:
    1) boolean

Sets whether or not to create the default autocollected bullet delete items when bullets are deleted to items. True will create the items, false will not. The default value is true.

LoadItemData

Arguments:
    1) script path

Loads the specified item data. Can be called any amount of times, but currently existing IDs will be replaced by new ones of the same value. You may not use the same file twice in this function; to do so, see ReloadItemData.

ReloadItemData

Arguments:
    1) script path

Reloads the specified item data. Can be called any amount of times, but currently existing IDs will be replaced by new ones of the same value. You do not need to use LoadItemData before using this function.