Raised This Month: $ Target: $400
 0% 

[HELP] Some questions to ask :D


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 05-14-2009 , 05:23   Re: [HELP] Some questions to ask :D
Reply With Quote #1

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(entityEV_VEC_velocityfVelocity
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(indexfx=kRenderFxNoner=255g=255b=255render=kRenderNormalamount=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;

__________________

Last edited by Hunter-Digital; 05-14-2009 at 05:29.
Hunter-Digital is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:28.


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