AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [ H3LP ] Get aiment current position? (https://forums.alliedmods.net/showthread.php?t=298955)

CrazY. 06-27-2017 15:44

[ H3LP ] Get aiment current position?
 
Hello, I'm trying to get the position of a entity that is following a player, but only one second after the player died. I can get the origin but only from where the entity was created and not from where it is currently.

Code:
new Float:origin[3] entity_get_vector(touched, EV_VEC_origin, origin) new entity = create_entity("info_target") entity_set_origin(entity, origin) entity_set_model(entity, facehugger_mask) entity_set_edict(entity, EV_ENT_aiment, touched) entity_set_int(entity, EV_INT_movetype, MOVETYPE_FOLLOW) entity_set_int(entity, EV_INT_solid, 0) ExecuteHamB(Ham_Killed, touched, toucher, 0) set_task(1.0, "get_mask_origin", entity)
Code:
public get_mask_origin(entity) { new Float:origin[3] entity_get_vector(entity, EV_VEC_origin, origin) }


All times are GMT -4. The time now is 22:52.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.