AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Address of an entity (https://forums.alliedmods.net/showthread.php?t=276017)

Perrytutoriales 12-12-2015 18:56

Address of an entity
 
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 .

http://i63.tinypic.com/jjxqv5.jpg

siriusmd99 12-13-2015 04:56

Re: Address of an entity
 
You mean like in movie "wanted" ? When the bullet doesn't go straight forward but on semi-circle?

Perrytutoriales 12-13-2015 10:50

Re: Address of an entity
 
Yes

Perrytutoriales 12-13-2015 16:33

Re: Address of an entity
 
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

ESForces 12-13-2015 20:12

Re: Address of an entity
 
You have to make use of "EV_VEC_velocity", then, update the speed at which the entity is traveling.

Perrytutoriales 12-13-2015 20:14

Re: Address of an entity
 
Might or could someone give me a demonstration in code please?

Perrytutoriales 12-14-2015 20:05

Re: Address of an entity
 
hi?

JusTGo 12-15-2015 06:23

Re: Address of an entity
 
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


All times are GMT -4. The time now is 18:02.

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