3. you can set the velocity if you want it to move with a certain speed... or set the origin to just teleport it there... ex:
PHP Code:
new Float:fVelocity[3]
fVelocity[2] = 100.0 // moves up
entity_set_vector(entity, EV_VEC_velocity, fVelocity)
4. all newly created entities fly by default, you must set movetype ( entity_set_int(ent, EV_INT_movetype, MOVETYPE_*) ) or add gravity, collisions, etc (see the values in hlsdk_const.inc), I wrote above how you can move an entity... but how to move it to a specified location... well, that'll require some calculations, I don't quite know how because I never done something like this but there are examples you can get from plugins that do such things... this for "From point A to point B" thing.... but if you want to spawn an ent at your location and move it where you aim, see
velocity_by_aim()
10. stocks are short versions of multiple functions working together to do something... ex (from engine_stocks.inc):
PHP Code:
/* Set rendering of an entity */
stock set_rendering(index, fx=kRenderFxNone, r=255, g=255, b=255, render=kRenderNormal, amount=16)
{
entity_set_int(index,EV_INT_renderfx,fx);
new Float:RenderColor[3];
RenderColor[0] = float(r);
RenderColor[1] = float(g);
RenderColor[2] = float(b);
entity_set_vector(index,EV_VEC_rendercolor,RenderColor);
entity_set_int(index,EV_INT_rendermode,render);
entity_set_float(index,EV_FL_renderamt,float(amount));
return 1;
}
__________________