Hi, I have an entity (a sprite) and it is setup like this:
PHP Code:
new iEntity = create_entity("func_button");
entity_set_int(iEntity, EV_INT_solid, SOLID_TRIGGER);
entity_set_int(iEntity, EV_INT_movetype, MOVETYPE_NONE);
entity_set_model(iEntity, g_szTimerSprites[iType]);
entity_set_size(iEntity, Float:{-16.0, -128.0, 0.0}, Float:{16.0, 128.0, 128.0});
When I try to hook a touch, however, the player never seems to touch the entity. The code for it is:
PHP Code:
register_touch("player","*","hook_touch");
public hook_touch(player, entity) {
new classname[32];
entity_get_string(entity, EV_SZ_classname, classname, 31);
console_print(player, "Class name touched: %s", classname);
}
I never get my entity touch, even though I walk through it. If I change the EV_INT_solid to SOLID_BBOX, it works just fine.
Any ideas why this is happening?
Thank you!
__________________
We all live under the same sky but we have different horizons.