AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Trying to get an entity to move from one origin to another.. (https://forums.alliedmods.net/showthread.php?t=28474)

Geesu 05-15-2006 14:37

Trying to get an entity to move from one origin to another..
 
I've created a bot using the following code:

Code:
BOT_Create( Float:origin[3] ) {     new ent = create_entity( "info_target" );     entity_set_origin( ent, origin );         entity_set_int(     ent, EV_INT_fixangle, 1                     );     entity_set_float(   ent, EV_FL_takedamage, 1.0                  );     entity_set_float(   ent, EV_FL_health, 100.0                    );     entity_set_string(  ent, EV_SZ_classname, "npc"                 );     entity_set_model(   ent, "models/player/arctic/arctic.mdl"      );     entity_set_int(     ent, EV_INT_solid, 2                        );     entity_set_byte(    ent, EV_BYTE_controller1, 125               );     entity_set_byte(    ent, EV_BYTE_controller2, 125               );     entity_set_byte(    ent, EV_BYTE_controller3, 125               );     entity_set_byte(    ent, EV_BYTE_controller4, 125               );     new Float:maxs[3] = {16.0,16.0,36.0};     new Float:mins[3] = {-16.0,-16.0,-36.0};     entity_set_size(    ent, mins, maxs                             );     entity_set_float(   ent, EV_FL_animtime, 2.0                    );     entity_set_float(   ent, EV_FL_framerate, 1.0                   );     entity_set_int(     ent, EV_INT_sequence, 1                     );     entity_set_float(   ent, EV_FL_nextthink,halflife_time() + 0.01 );     drop_to_floor( ent );     return ent; }

How can I tell the ent to move from one origin to another? I want it to "walk" to it, not just teleport... So all I have is ent id, start location, end location...

Help please?

v3x 05-15-2006 15:08

Like this? http://forums.alliedmods.net/showthr...=242472#249748

Cheap_Suit 05-15-2006 16:54

He is trying o make the bot walk there. The code I posted might cause the bot to hop if it while on the ground.


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

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