AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [2 Problems] func_wall and velocity_by_aim (https://forums.alliedmods.net/showthread.php?t=120300)

Excalibur.007 03-03-2010 02:37

[2 Problems] func_wall and velocity_by_aim
 
1. func_wall
Is there any other thing than func_wall? I wanted a thing that check it for walls(Vertical). Examples: cs_mansion those concrete gray walls.

2. velocity_by_aim
How can I make it so that if the user move the mouse but still go the previous direction
If not possible, is there a way I can block mouse movement? Btw if I want to unbind mouse, what is the key? client_cmd(id, "unbind <what key>")

PHP Code:

static Float:aim_velocity]
velocity_by_aimplayer1200aim_velocity )
set_user_velocityplayeraim_velocity 


Arkshine 03-03-2010 05:56

Re: [2 Problems] func_wall and velocity_by_aim
 
- ( don't understand )
- velocity_by_aim() use pev_v_angle, to do what you need, you should use pev_angles.

pev( player, pev_angles, angles );

engfunc( EngFunc_MakeVectors, angles );
global_get( glb_v_forward, forwardDir );

aim_velocity [ 0 ] = forwardDir[ 0 ] * 1200;
aim_velocity [ 1 ] = forwardDir[ 1 ] * 1200;
aim_velocity [ 2 ] = forwardDir[ 2 ] * 1200;

Excalibur.007 03-03-2010 06:52

Re: [2 Problems] func_wall and velocity_by_aim
 
Error: Invalid expression, assumed zero

global_get( glb_v_forward, forward )??

Arkshine 03-03-2010 07:21

Re: [2 Problems] func_wall and velocity_by_aim
 
I've edited the code above.

Excalibur.007 03-03-2010 17:25

Re: [2 Problems] func_wall and velocity_by_aim
 
Ok thanks btw, what's the different between pev_angles and pev_v_angle?
EDIT: I need to know it cause I rarely use FM in my plug-ins(Meaning I don't know a lot about FM.)
EDIT2: Velocity works but I still can move using the mouse(Changing direction)

wrecked_ 03-03-2010 17:28

Re: [2 Problems] func_wall and velocity_by_aim
 
Somewhat reliable pev research. Your pevs are at the bottom.

http://xpaw.crannk.de/pev_research.php

Excalibur.007 03-03-2010 17:36

Re: [2 Problems] func_wall and velocity_by_aim
 
:o ty

This is my current code
PHP Code:

enum _:Angle_t Float:PitchFloat:YawFloat:Roll }
enum _:Coord_t Float:xFloat:yFloat:}

new 
Float:viewAnglesAngle_t ]
new 
Float:aim_velocity]
new 
Float:forwardDirCoord_t ]
        
pevplayerpev_v_angleviewAngles )

engfuncEngFunc_MakeVectorsviewAngles )
global_getglb_v_forwardforwardDir )
        
aim_velocity] = forwardDir] * 1200
aim_velocity
] = forwardDir] * 1200
aim_velocity
] = forwardDir] * 1200
        
set_pev
playerpev_velocityaim_velocity 

Velocity works but not going the same direction. Meaning I wanted it to stay on the moving position even the mouse is moved.
EDIT: pev_angles also does the same thing as pev_v_angle


All times are GMT -4. The time now is 08:36.

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