Raised This Month: $ Target: $400
 0% 

Address of an entity


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Perrytutoriales
Member
Join Date: Mar 2014
Old 12-12-2015 , 18:56   Address of an entity
Reply With Quote #1

Hello I am new to create entities , I need to change the shape or direction of travel of the organization, I have my body that travels straight toward the look of the player, but I need a turn before it hits its target, I have tried to do this a thousand times but not how to do if I could teach or give me the code would appreciate it please .

Perrytutoriales is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 12-13-2015 , 04:56   Re: Address of an entity
Reply With Quote #2

You mean like in movie "wanted" ? When the bullet doesn't go straight forward but on semi-circle?
siriusmd99 is offline
Perrytutoriales
Member
Join Date: Mar 2014
Old 12-13-2015 , 10:50   Re: Address of an entity
Reply With Quote #3

Yes
Perrytutoriales is offline
Perrytutoriales
Member
Join Date: Mar 2014
Old 12-13-2015 , 16:33   Re: Address of an entity
Reply With Quote #4

The kiblast YELLOW its my entity, I like to do like the kiblast BLUE Trayectory

https://www.youtube.com/watch?v=8DbsexDiotg

Sorry for me english

Last edited by Perrytutoriales; 12-13-2015 at 16:33.
Perrytutoriales is offline
ESForces
Member
Join Date: Dec 2012
Location: Omniverse
Old 12-13-2015 , 20:12   Re: Address of an entity
Reply With Quote #5

You have to make use of "EV_VEC_velocity", then, update the speed at which the entity is traveling.
ESForces is offline
Perrytutoriales
Member
Join Date: Mar 2014
Old 12-13-2015 , 20:14   Re: Address of an entity
Reply With Quote #6

Might or could someone give me a demonstration in code please?
Perrytutoriales is offline
Perrytutoriales
Member
Join Date: Mar 2014
Old 12-14-2015 , 20:05   Re: Address of an entity
Reply With Quote #7

hi?
Perrytutoriales is offline
JusTGo
Veteran Member
Join Date: Mar 2013
Old 12-15-2015 , 06:23   Re: Address of an entity
Reply With Quote #8

look at the soccerjum plugin it does waht you say when you curve the ball


PHP Code:
public CurveBall(id) {
    if(
direction && get_speed(aball) > && curvecount 0) {

        new 
Float:dAmt float((direction CURVE_ANGLE) / ANGLEDIVIDE);
        new 
Float:v[3], Float:v_forward[3];
        
        
entity_get_vector(aballEV_VEC_velocityv);
        
vector_to_angle(vBallSpinDirection);

        
BallSpinDirection[1] = normalizeBallSpinDirection[1] + dAmt );
        
BallSpinDirection[2] = 0.0;
        
        
angle_vector(BallSpinDirection1v_forward);
        
        new 
Float:speed vector_length(v)// * 0.95;
        
v[0] = v_forward[0] * speed
        v
[1] = v_forward[1] * speed
        
        entity_set_vector
(aballEV_VEC_velocityv);

        
curvecount--;
        
set_task(CURVE_TIME"CurveBall"id);
    }

https://forums.alliedmods.net/showthread.php?t=41447
__________________

Last edited by JusTGo; 12-15-2015 at 06:24.
JusTGo 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:16.


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