AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   problem with setting gravity (https://forums.alliedmods.net/showthread.php?t=85047)

Speed! 02-04-2009 18:11

problem with setting gravity
 
this does not work me

set_pev(id, pev_gravity, g_zclass_grav[g_zombieclass[id]] + gravityupgrade)

it gets stuck into the roof

if u wanna know, gravityupgrade = -180

already tried with positive numbers... dont work
if i remove the gravityupgrade it works

L// 02-04-2009 20:21

Re: problem with setting gravity
 
set_pev(id, pev_gravity, 1.0)

gravity = 800


Other ie:

new Float:gravity = 0.5
set_pev(id, pev_gravity, gravity)

gravity = 450

SnoW 02-05-2009 08:34

Re: problem with setting gravity
 
Quote:

Originally Posted by L// (Post 755909)
set_pev(id, pev_gravity, 1.0)

gravity = 800


Other ie:

new Float:gravity = 0.5
set_pev(id, pev_gravity, gravity)

gravity = 450

First simple math:
900 * 0.5 = 450, but
800 * 0.5 = 400
Also your example only happens if sv_gravity is the default 800.
In pev_gravity, 3rd parameter is a factor for the sv_gravity cvar.
Example:
sv_gravity = 200
set_pev(player_index, pev_gravity, 0.5);
Player's gravity is 200 * 0.5 = 100

Speed! 02-05-2009 12:35

Re: problem with setting gravity
 
but with yours examples it says tag mismatch :S
thanks for answering

SnoW 02-05-2009 14:39

Re: problem with setting gravity
 
Quote:

Originally Posted by Speed! (Post 756231)
but with yours examples it says tag mismatch :S
thanks for answering

I can't know what u did wrong(I can never be wrong), showing your code would be something.

AntiBots 02-05-2009 14:46

Re: problem with setting gravity
 
Quote:

Originally Posted by Speed! (Post 756231)
but with yours examples it says tag mismatch :S
thanks for answering

Check if you are Using Float.

Speed! 02-05-2009 15:15

Re: problem with setting gravity
 
Quote:

Originally Posted by AntiBots (Post 756316)
Check if you are Using Float.

yep, i just fixed it
my problem was this
i was using static float: gravityupgrade instead of static Float: gravityupgrade
fucking pawn case sensitive.. LOL

ConnorMcLeod 02-06-2009 00:40

Re: problem with setting gravity
 
Quote:

Originally Posted by Speed! (Post 756332)
yep, i just fixed it
my problem was this
i was using static float: gravityupgrade instead of static Float: gravityupgrade
fucking pawn case sensitive.. LOL

This is because float is a native

Float: float ( value )


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

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