Skip to content

Custom entity setup() function argument #79

@h0l1day117

Description

@h0l1day117

I'm writing custom entity which is not extending from ValveIONode. I followed the wiki instruction copied these code and got an error

Parse Error: Invalid argument for "get_entity_transform()" function: argument 1 should be "VMFEntity" but is "Dictionary".

my code:

class_name func_door_rotating extends InteractableComponent(my own class defined elsewhere)

var entity : Dictionary = {}

static func setup(entity_structure : Dictionary, instance: func_door_rotating):
	instance.entity = entity_structure; # This is required
	instance.transform = ValveIONode.get_entity_transform(entity_structure);
	instance.basis *= Basis(Vector3.UP, -PI / 2);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions