Index | FAQ | Search | Memberlist | Usergroups | Profile | Log in to check your private messages | Log in | Register

conditional player movement.

| Inside3d Forums Forum Index -> QuakeC Programming

View previous topic :: View next topic
Author | Message
--- | ---
something Joined: 20 Apr 2010 Posts: 17 Location: Melbourne,Au |

Posted: Thu Apr 29, 2010 9:25 am Post subject: conditional player movement. |

hey, does anyone have any ideas on would be the best way to code player movement restrictions that changes depending on conditions, such as *taking damage *low health *mid health
*normal health
*'drunken' view depending on health.
i know i can do something like
if health < 50
stuffcmd(blahblah)
but that means i have to write out conditions for each health bracket and there is no blending between them unless i explicitly code it all health points, eg 1,2,3,4,5,6,7,8, etc,
ive tried generating a value for use in a stuff cmd. but it treats it as 2 separate values or something.
its probably something really obvious that i missed.
but im a dumbdumb so any help is apreciated.
i assume csqc would probably be able to do this but im totally lost in csqc over just slightly lost in qc.

Back to top |

Spike Joined: 05 Nov 2004 Posts: 944 Location: UK |

Posted: Thu Apr 29, 2010 9:53 am Post subject: |

stuffcmd(self, "v_idlescale "); stuffcmd(self, ftos(howmuch)); stuffcmd(self, "\n"); ? if you want it tied to damage then it'll be a bit poo, as there's no interpolation, and it'll snap. It'll also fail to respond to the direction damage was taken from.
csqc has full control over the client's angles, yeah. Which can be smoothed and could end up a lot better than spamming idlescale constantly. But changing the player's view angle constantly is more than a little annoying.
.float maxspeed; can be used if you want to slow the player down a little when they're hurt.
_________________
What's a signature?

Back to top |

something Joined: 20 Apr 2010 Posts: 17 Location: Melbourne,Au |

Posted: Thu Apr 29, 2010 9:48 pm Post subject: |

thanks, pretty much what i had. except now i can just have some math work out the values.

Back to top |

Display posts from previous:

| Inside3d Forums Forum Index -> QuakeC Programming | All times are GMT
Page 1 of 1

Jump to:

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2004 phpBB Group