Editable Tag Property in Verse Device

Is there any way to add a @editable modifier to a tag type so I can select it through the editor?

custom_tag := class(tag){}

MyClass := class(creative_device):

   @editable TagProperty : tag = tag{}

This code throws me the following error:

The editable attribute is not supported for classes that aren't concrete.

Thanks in advance!

This is not how Gameplay Tags work

The purpose of tags is actually to retrieve a bunch of devices without having to reference them through an @editable array.
You have to add a Verse tag Component to the actor.

I understand this part, I have all the devices correctly tagged already.
What I meant was using this @editable tag in purposes of searching for other devices with selected tag only.

For now I have all the tags I need to search for inside an array, but that’s far from the best way to use and change in the editor.

Oh okay I wasn’t sure that you were trying to do that actually, well you could use an enum to do that :

Tag1 : tag = tag{}
Tag2 : tag = tag{}
Tag3 : tag = tag{}

fetchable_tag := enum:
    Tag1
    Tag2
    Tag3

(Tag:fetchable_tag).ToTagClass():tag=
    case (Tag):
        fetchable_tag.Tag1 => Tag1
        fetchable_tag.Tag2 => Tag2
        fetchable_tag.Tag3 => Tag3

A bit annoying to setup, but we’re still limited right now :person_shrugging:

3 Likes

While yes, not the best way to do (for now, I guess), it is exactly what I needed, thank you very much!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.