set_pev ?
I have this code for a new entity that i am touching that will give you low gravity for 4 seconds and execute jump.
My way of thinking is that this would work..but it seems not to. Here is what I have ... Code:
Code:
The problems I am having are when you touch entity it gives you low gravity, but i think it starts out around 200 then goes to 0 or a neg value...cuz you never come down. Then on new round you can't jump...which i think is because your gravity is still set too low. Anyone...lol ? |
Re: set_pev ?
First off, pev_gravity needs a float.
Second, I could be wrong, but I think pev_gravity is based on a 1.0 scale. (1.0 being normal grav) And why not just use fun? |
Re: set_pev ?
you dont send the client id through set_task
|
Re: set_pev ?
As Emp` pointed out, pev_gravity from what I've seen is just a scale based on sv_gravity. For example, if the server gravity were to be 800 and an entity/player's pev_gravity would be 1 they would act according to the server's gravity value of 800. However, if you had pev_gravity set to 0.5 that would be half of the server gravity or 2 for double.
|
Re: set_pev ?
Well, thank you for all your input, and ...
Quote:
Quote:
Quote:
|
Re: set_pev ?
just use an if(!(pev(id, pev_flags) & FL_ONGROUND)) with a bool in a prethink that goes to a function that then turns off the bool and has a 4 sec set task to your grav with the bool resetting once on ground.
|
Re: set_pev ?
Code:
set_task(4.0,"normal_grav") you dont give the client id to set_task, so you wont get it in normal_grav when you call it. Code: new CORE[1]; CORE[0] = id; set_task(4.0,"normal_grav",_, CORE, 1 ); and then you have to read the id in the normal_grav function Code:
|
Re: set_pev ?
Hum...i have a question! I have those functions :
Code:
public func_call(id) |
Re: set_pev ?
Quote:
Code:
What about something like this...or should i use Post think ? |
Re: set_pev ?
Code:
This should be: Code:
|
| All times are GMT -4. The time now is 21:32. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.