EntityPostHook on start_touch
Posted: Tue Mar 20, 2018 3:20 pm
I cant seem to get start_touch to convert the Pointers to Entities not sure what I'm doing wrong.
Syntax: Select all
@EntityPostHook(EntityCondition.equals_entity_classname("trigger_multiple"), 'start_touch')
def Entity_StartTouch(stack, arg2):
#arg2 seems to always be None
ent = make_object(Entity, stack[0])
ent2 = make_object(Entity, stack[1])
Code: Select all
[SP] Caught an Exception:
Traceback (most recent call last):
File "..\addons\source-python\plugins\timer\timer.py", line 99, in Entity_StartTouch
ent = make_object(Entity, stack[0])
File "..\addons\source-python\packages\source-python\entities\_base.py", line 218, in _obj
return cls(index_from_pointer(ptr))
ValueError: Conversion from "Pointer" (<_memory.Pointer object at 0x00DD44A0>) to "Index" failed.