Skip to content

槽系统


管理您的库存、棋盘游戏和瓷砖环境中的任何类型的槽。

该社区扩展的作者和贡献者: infokubarcade

警告

这是一个由社区成员创建的扩展 - 但不是由GDevelop扩展团队审查的。因此,我们不能保证它符合所有官方扩展的质量标准。如果有疑问,请在使用之前联系作者了解扩展的功能或检查其内容。


在任意类型的槽中存储内容。

用法

  • 向槽中添加、计数和删除物品
  • 检查有多少个已填充或空的槽
  • 为每个槽设置最大或无限数量的物品
  • 添加和删除槽的属性(武器类别、物品类别、物体重量等)
  • 将槽中的内容移动到另一个位置
  • 对属性求和(对于重量系统很有用)
  • 使用属性值对物品排序(仅按字母顺序升序)
  • 泛洪系统:自动添加物品,当它们达到槽的最大容量时,它们会进入下一个空槽
  • 以JSON形式导出/导入槽

系统

  • 提供3种系统(基本、命名槽和网格)

基本

使用数字作为槽标识符来检索您的信息

命名槽

使用文本作为槽标识符。当您想把物品放在角色的特定部位时非常有用。

网格

使用2D网格位置来检索您的信息。它以更方便的方式使用基本槽系统。

提示

通过按步骤指南学习如何安装新扩展

操作

自动添加物品

自动将物品添加到其槽中,必要时添加到下一个空槽。

添加命名槽

在空间中添加一个带有名称的特殊槽。

导入JSON字符串

导入JSON字符串并将其转换为槽系统。

删除网格槽

从空间中删除一个网格槽。

删除命名槽

从空间中删除一个槽。

删除槽

从空间中删除一个槽。

将物品从网格中移动到其他位置

将物品从一个位置移动到另一个位置。

将物品从命名槽移动到命名槽

将物品从一个命名槽移动到另一个命名槽。

将物品从命名槽移动到槽

将物品从一个槽移动到另一个槽。

将物品从槽移动到命名槽

将物品从一个槽移动到另一个命名槽。

将物品从槽移动到槽

将物品从一个槽移动到另一个槽。

删除网格槽属性

从网格槽中删除属性内容。

删除命名槽属性

从命名槽中删除属性内容。

删除槽属性

从槽中删除属性内容。

更改空间的网格槽计数

更改空间的网格槽计数。

清空网格槽

仅清空空间的网格槽。它仍然存在于空间中。

Set an item in a grid slot 将一个物品放入网格位置中

Grid slot max count 更改网格位置的最大数量,或者设置为0表示无限制。

Grid slot number property 更改网格位置的数值属性。

Grid slot text property 更改网格位置的文本属性。

Set grid slot unlimited 将网格位置的最大数量设置为无限制。

Named slot count 更改空间中命名位置的数量。

Empty the named slot 只清空空间中的命名位置,但该位置仍然存在于空间中。

Set an item in a named slot 将一个物品放入命名位置中

Named slot max count 更改命名位置的最大数量,或者设置为0表示无限制。

Named slot number property 更改命名位置的数值属性。

Named slot text property 更改命名位置的文本属性。

Set named slot unlimited 将命名位置的最大数量设置为无限制。

Slot count 更改空间的槽数量。

Empty the slot 只清空空间中的槽位,但该槽位仍然存在于空间中。

Set an item in a slot 将一个物品放入槽位中

Slot max count 更改槽位的最大数量,或者设置为0表示无限制。

Slot number property 更改槽位的数值属性。

Slot text property 更改槽位的文本属性。

Set slot unlimited 将槽位的最大数量设置为无限制。

Set grid size 使用网格尺寸设置空间的大小。

Set space size 设置空间中的槽位数量。

Sort items by property 根据属性对物品进行排序,并将其移动到新的槽位顺序中。

Conditions

Convert grid position to slot index 将网格位置转换为槽位索引。

Convert a slot to a grid column index 从槽位中获取列索引。

Convert a slot to a grid row index 从槽位中获取行索引。

Named slot exists 检查命名位置是否存在。

The space exists 检查空间是否存在。

Filled named slots 比较空间中已填充命名位置的数量。

Filled slots 比较空间中已填充槽位的数量。

First empty slot 比较第一个空槽位。如果找不到槽位,则设置为-1。

First item slot 比较第一个包含特定物品的槽位。如果找不到槽位,则设置为-1。

First available slot 比较第一个包含特定物品且不满的槽位。如果找不到槽位,则设置为-1。

Item at a grid position 比较网格位置上的物品。

Grid slot count 比较空间中网格位置的数量。

Grid slot max count 比较网格位置的最大数量,或者设置为0表示无限制。

The space has empty named slots 检查空间中是否有空的命名位置。

The space has empty slots 检查空间中是否有空的槽位。

Grid slot has property 检查网格位置是否设置了属性。

Named slot has property 检查命名位置是否设置了属性。

Slot has property 检查槽位是否设置了属性。

Grid slot contains an item 网格位置包含一个或多个物品。Grid slot is full The grid slot is full.

Grid slot is unlimited Check if the slot has an unlimited count.

Named slot contains an item The named slot contains one or more items.

Named slot is full The slot is full.

Named slot is unlimited Check if the named slot has an unlimited count.

Slot contains an item The slot contains one or more items.

Slot is full The slot is full.

Slot position in grid Check if the slot position is inside the grid boundaries.

Slot is unlimited Check if the slot has an unlimited count.

The grid exists Check if the space has a grid.

Named slot count Compare the named slot count of a space.

Named slot item name Compare the item name of a slot.

Named slot max count Compare the named slot max count, or 0 if unlimited.

Slot property count Compare the property count of a space.

Grid slot number property Compare the number property of a grid slot.

Named slot number property Compare the number property of a named slot.

Slot number property Compare the number property of a slot.

Remaining named slots Compare the remaining named slots of a space.

Remaining slots Compare the remaining slots of a space.

Slot count Compare the slot count of a space.

Slot item name Compare the item name of a slot.

Slot max count Compare the slot max count, or 0 if unlimited.

Slot property count Compare the property count of a space.

Space grid height Compare the space grid height.

Space grid width Compare the space grid width.

Space named slot size Compare how many slots the space has.

Space slot size Compare how many slots the space has.

Sum of named slot properties Compare Sum all the values of a slot property.

Sum of slot properties Compare Sum all the values of a slot property.

Grid slot text property Compare the text property of a grid slot.

Named slot text property Compare the text property of a named slot.

Slot text property Compare the text property of a slot.

Expressions


Expression

Description

SlotSystem::ConvertGridPositionToSlot(string, number, number)

Return a slot index of a grid position.

🔤 Name (String)

Space name

🔢 Number

Column index

🔢 Number

Row index

SlotSystem::ConvertSlotToGridColumn(string, number)

Return the column index from a slot.

🔤 Name (String)

Space name

🔢 Number

Slot

SlotSystem::ConvertSlotToGridRow(string, number)

Return the row index from a slot.

🔤 Name (String)

Space name

🔢 Number

Slot

SlotSystem::FilledNamedSlots(string)

Return the amount of filled named slots of a space.

🔤 Name (String)

Space name

SlotSystem::FilledSlots(string)

Return the amount of filled slots of a space.

🔤 Name (String)

Space name

SlotSystem::FirstEmptySlot(string)

Return First empty slot. Set to -1 if no slot is found.

🔤 Name (String)

Space name

###

空间名称

`SlotSystem::SpaceGridWidth(string)`

返回空间的网格宽度。

### Name (String)

空间名称

`SlotSystem::SpaceNamedSlotSize(string)`

返回空间包含的插槽数量。

### Name (String)

空间名称

`SlotSystem::SpaceSlotSize(string)`

返回空间包含的插槽数量。

### Name (String)

空间名称

`SlotSystem::SumNamedSlotProperty(string, string)`

返回插槽属性的所有值的总和。

### Name (String)

空间名称

### Name (String)

属性名称

`SlotSystem::SumSlotProperty(string, string)`

返回插槽属性的所有值的总和。

### Name (String)

空间名称

### Name (String)

属性名称

`SlotSystem::TextOfGridSlotProperty(string, number, number, string)`

返回网格插槽的文本属性。

### Name (String)

空间名称

### Number

列索引

### Number

行索引

### Name (String)

属性名称

`SlotSystem::TextOfNamedSlotProperty(string, string, string)`

返回命名插槽的文本属性。

### Name (String)

空间名称

### Name (String)

插槽名称

### Name (String)

属性名称

`SlotSystem::TextOfSlotProperty(string, number, string)`

返回插槽的文本属性。

### Name (String)

空间名称

### Number

插槽

### Name (String)

属性名称

`SlotSystem::ToJSON(string)`

将完整的空间转换为JSON格式。

### Name (String)

空间名称


此页面是由社区制作的[Slot系统](https://wiki.gdevelop.io/gdevelop5/extensions)的自动生成参考页面。