PhaserEditor2D-v3 icon indicating copy to clipboard operation
PhaserEditor2D-v3 copied to clipboard

[Feature request] Multiple same type of component attached to game object

Open gon777 opened this issue 3 years ago • 4 comments

Dear Phaser Editor Devs,

Hi,

Can we have a feature that allows us to add multiple components of the same type to a game object? Like Unity? We want to add things like status effects, inventory checks etc in editor

Cheers

gon777 avatar Jun 10 '21 05:06 gon777

Yes. That's in the plan. Thanks!

However, it would be great if someday you find the time to explain with more details a case where you need it. It will help me to implement a solution that fits more cases.

PhaserEditor2D avatar Jun 10 '21 07:06 PhaserEditor2D

happy to provide an example we have a character in game that can buy and equip (or simply keep in their inventory), clothing items that fit into various categories (head, feet, hands etc). Certain areas of the world are locked off until you either own or equip a certain item. we want to be able to add ItemOwnership component to room triggers. This component would have properties like item slot: select option item id: integer needs to be equipped: checkbox (if unticked, owning an item is enough)

So if a room trigger requires multiple items, you would add multiple components and provide different configuration options.

aleksei-tro avatar Jun 11 '21 00:06 aleksei-tro

Hi @aleksei-tro!

Thanks for the example. And how are you solving it now?

PhaserEditor2D avatar Jun 11 '21 11:06 PhaserEditor2D

Hi. I'm going to implement this but not with the user components, else with a new ScriptObject type. Keep in contact.

PhaserEditor2D avatar Apr 08 '22 02:04 PhaserEditor2D

You can make this with the Script Nodes https://help-v3.phasereditor2d.com/scene-editor/script-node.html

PhaserEditor2D avatar Jun 23 '23 19:06 PhaserEditor2D