Search found 170 matches

by DusterdooSmock
Wed Nov 09, 2011 1:12 am
Forum: QuakeC Programming
Topic: Rewriting Quake's player animation code..
Replies: 4
Views: 2312

Rewriting Quake's player animation code..

I started to re-write Quake's player animation code today (to be easier expanded and understood easier), and so far it's going great.

But, now I have come across a couple of roadblocks...

1). I need some help of figuring out how the make it so that if the player's velocity is 0, and the run ...
by DusterdooSmock
Mon Oct 24, 2011 3:22 am
Forum: QuakeC Programming
Topic: Limiting a vector?
Replies: 11
Views: 2836

Re: Limiting a vector?

qbism wrote:Have you looked at vore ball code?
Just took a look at it after I read this, didn't see anything new except for a change in the ball's velocity based on the skill..

EDIT: Anyone have any ideas on doing this? I still haven't got it working..
by DusterdooSmock
Sun Oct 23, 2011 6:05 pm
Forum: QuakeC Programming
Topic: Limiting a vector?
Replies: 11
Views: 2836

Re: Limiting a vector?

I'm still getting the same results as with the other solutions;
the rocket fires, goes straight, then last minute, it makes a sharp turn, then hits the enemy.

I'm trying to do something like this;
vector newdir;
float maxdir;
maxdir = some number;

if the angles of the newdir are > than the maximum ...
by DusterdooSmock
Sat Oct 22, 2011 6:04 pm
Forum: QuakeC Programming
Topic: Limiting a vector?
Replies: 11
Views: 2836

Re: Limiting a vector?

I have a heat seeker missile in one of my unfinished mods that turns slowly towards the enemy, while accelerating. Here's the code:


It works, but I've been trying all morning to get it to not accelerate, just slowly change angles, but to no avail.. :(

Basically, all I'm trying to get it to do ...
by DusterdooSmock
Sat Oct 22, 2011 5:42 am
Forum: QuakeC Programming
Topic: Limiting a vector?
Replies: 11
Views: 2836

Re: Limiting a vector?

New direction should be the old direction plus some fraction of the current direction to target. This might do it:

dir = normalize(normalize(self.velocity) + 0.2*normalize(vtemp - self.origin));

I don't know if it's the most efficient way.

We're getting there.. It works, but for some reason ...
by DusterdooSmock
Sat Oct 22, 2011 1:25 am
Forum: QuakeC Programming
Topic: Limiting a vector?
Replies: 11
Views: 2836

Re: Limiting a vector?

andrewj wrote:

Code: Select all

self.velocity = self.velocity + dir * 25
I gave it a shot anyway, just to see what it would do... For some reason the rockets didn't home in on ANY enemies with that. :(
by DusterdooSmock
Fri Oct 21, 2011 2:28 am
Forum: QuakeC Programming
Topic: Limiting a vector?
Replies: 11
Views: 2836

Limiting a vector?

Using this tutorial: http://inside3d.com/showtutorial.php?id=44 (a modified version anyway), is there a way to limit how much the projectile can alter it's angles when it homes in on an enemy?
IE: the rocket sees a target, but can't do a compete 180 degree turn to get to it, it will only be able to ...
by DusterdooSmock
Thu Oct 20, 2011 12:06 am
Forum: QuakeC Programming
Topic: Reversing the angles of an entity
Replies: 9
Views: 2519

Re: Reversing the angles of an entity

I'll give it a shot. Thanks. ;)

EDIT:
It works like what I needed. Thank you. :)
by DusterdooSmock
Tue Oct 18, 2011 10:33 pm
Forum: QuakeC Programming
Topic: Reversing the angles of an entity
Replies: 9
Views: 2519

Re: Reversing the angles of an entity

r00k wrote:ent.movetype |= MOVETYPE_BOUNCE ?
But that won't alter the angles so that the projectile flies in the path that I described...
by DusterdooSmock
Tue Oct 18, 2011 9:56 pm
Forum: QuakeC Programming
Topic: Reversing the angles of an entity
Replies: 9
Views: 2519

Re: Reversing the angles of an entity

Ok, now I would like to expand upon this a little bit...

http://img11.imageshack.us/img11/4697/3dwalls.jpg

Lets say the projectile flies at wall "A" from location 1.
How would I alter the angles of the projectile so that after it hits wall "A", it flies towards wall "B", and then when it hits ...
by DusterdooSmock
Fri Oct 07, 2011 7:33 pm
Forum: QuakeC Programming
Topic: Reading Strings One Letter at a Time?
Replies: 3
Views: 1533

Re: Reading Strings One Letter at a Time?

Yes, I plan on saving stats such as weapons that the player has unlocked, and experience points, encrypting them, and saving them using FRIK_FILE.
by DusterdooSmock
Fri Oct 07, 2011 3:22 am
Forum: QuakeC Programming
Topic: Reading Strings One Letter at a Time?
Replies: 3
Views: 1533

Reading Strings One Letter at a Time?

Is there a way to read a string one character or letter at a time? And, the same but for writing a string?
I'm working on a way to encrypt a player's stats, but I need to be able to encrypt each individual letter of a stat string.
by DusterdooSmock
Mon Oct 03, 2011 8:08 pm
Forum: QuakeC Programming
Topic: Changing the pitch of a sound through QC?
Replies: 9
Views: 2254

Re: Changing the pitch of a sound through QC?

void(entity e, float chan, string samp, float vol, float atten, float speedpct) soundpitch = #8;

identical to existing sound builtin. using random(80,120) or so gives a reasonable range to stop sounds from being quite so monotonous. and because its the same builtin number, its generally safe to ...
by DusterdooSmock
Sun Oct 02, 2011 1:25 am
Forum: QuakeC Programming
Topic: Changing the pitch of a sound through QC?
Replies: 9
Views: 2254

Changing the pitch of a sound through QC?

Is there a way to change the pitch of a sound that is being played through qc?
Sort of like the voicepitch for bots in CS:S, but I had another use in mind for it.
by DusterdooSmock
Wed Sep 28, 2011 1:33 pm
Forum: QuakeC Programming
Topic: Reversing the angles of an entity
Replies: 9
Views: 2519

Re: Reversing the angles of an entity

Alright, thanks guys. :D