Hey!
I am currently seeing some behavior that looks like a bug. When I reference a subclass oif creative_device_base
from my npc_behaviour
, it lets me pick one from the level (using the actor picker tool), but when I reference my own device (deriving from creative_device
) it thinks that it’s a normal serialized class and wants me to fill in the fields myself. Here’s my setup:
npc_creep_medic<public> := class(npc_behavior):
# A subclass of creative_device
@editable
VFXSpawnerPool:device_pool_vfx = device_pool_vfx{}
# A subclass of creative_device_base
@editable
Btn:button_device = button_device{}
# Another file
device_pool_vfx := class(creative_device):
@editable
Devices:[]vfx_spawner_device = array{}
var Pool:device_pool(vfx_spawner_device) = device_pool(vfx_spawner_device){}
OnBegin<override>()<suspends>:void=
set Pool = CreateDevicePool(Devices)
GetInstance()<decides><transacts>:vfx_spawner_device =
InstanceResult := Pool.GetInstance[]
NewPool := InstanceResult(0)
Instance := InstanceResult(1)
set Pool = NewPool
return Instance
ReturnInstance(Instance:vfx_spawner_device):void =
NewPool := Pool.ReturnInstance(Instance)
set Pool = NewPool
This is what this looks like in Editor (in a NPCCharacterDefinition
asset)
Am I doing something wrong or is this not supported/intended?