AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Entity wont move (https://forums.alliedmods.net/showthread.php?t=25835)

Kurai 03-21-2006 11:18

Entity wont move
 
Code:
public atk_think(id) {   new Float:test[3] = {0.0,0.0, 10.0}   entity_set_vector(id,EV_VEC_velocity,test);   entity_set_float(id,EV_FL_nextthink,halflife_time() + 0.01) } public cmdBlast(id) {   new Float:pOrigin[3];   entity_get_vector(id,EV_VEC_origin,pOrigin)   pOrigin[2] += 20;   new ent = create_entity("info_target")       entity_set_string(ent,EV_SZ_classname,"blast")   entity_set_model(ent,"sprites/blast.spr")   entity_set_vector(ent,EV_VEC_origin,pOrigin)   entity_set_int(ent,EV_INT_solid, 2)   entity_set_float(ent,EV_FL_nextthink,halflife_time() + 0.01)     return PLUGIN_HANDLED }

the entity creates just fine and the entity thinks as well (i checked the ids the think function was receiving) however the sprite wont move.. any thoughts y?

EDIT: I fixed it. i based the entity on func_wall instead of info_target.

Basic-Master 03-21-2006 16:21

I'd say because you are using entity_set_vector to set the origin of your ent, use entity_set_origin instead.


All times are GMT -4. The time now is 16:44.

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