Search found 77 matches

by necros
Sun Oct 23, 2011 2:39 am
Forum: QuakeC Programming
Topic: Limiting a vector?
Replies: 11
Views: 2836

Re: Limiting a vector?


self.velocity = normalize(self.velocity);
newVec = self.enemy.origin - self.origin;
newVec = normalize(newVec);
t = time - self.ltime;
self.ltime = time;

percentage = 0.1;
self.velocity = (self.velocity * (1 - percentage) * t) + ( newVec * percentage * t);
self.velocity = normalize(self ...
by necros
Wed Sep 28, 2011 12:48 am
Forum: QuakeC Programming
Topic: Reversing the angles of an entity
Replies: 9
Views: 2519

Re: Reversing the angles of an entity

Spike's entirely code is correct. however, if you want to literally bounce "back towards where it came from", then that's simply a matter of inverting the .velocity vector. (ie: self.velocity = self.velocity * -1).
by necros
Tue Sep 06, 2011 11:25 pm
Forum: General Discussion
Topic: Congratz on forum upgrade
Replies: 26
Views: 5523

Re: Congratz on forum upgrade

pressed f5 and suddenly--!

the big thing for me is the larger new topic/reply buttons. (or rather, that you can't start a new topic when in a thread anymore). i used to always hit the new post button accidentally. :P
by necros
Fri Sep 02, 2011 7:05 pm
Forum: QuakeC Programming
Topic: Pendulum physics
Replies: 15
Views: 4777

you might want to try something simpler than a rope for just a swinging lamp.

instead of treating like a rope, treat it like a ball and socket joint, which is a much simpler problem.

because the lamp is hanging, we know it must always accelerate in such a way as to end up perpendicular with the ...
by necros
Thu Sep 01, 2011 6:45 pm
Forum: QuakeC Programming
Topic: Pendulum physics
Replies: 15
Views: 4777

interesting... checked out the qc for the link you gave above.

something in there called pflags which i guess is a DP specific flag set. i'll have to experiment with that i guess.
by necros
Thu Sep 01, 2011 6:35 am
Forum: QuakeC Programming
Topic: Pendulum physics
Replies: 15
Views: 4777

i've tried a couple of seperate ways to do it, but the results are not 100%.

you can see it in action here:
http://www.youtube.com/watch?v=21D-21MLrAE

currently, the video i linked uses the .velocity method:

essentially, what is done, is you build the rope out of a chain of seperate entities. it ...
by necros
Wed Aug 17, 2011 10:13 pm
Forum: QuakeC Programming
Topic: Two entity questions.
Replies: 3
Views: 1452

knowing a bit of vector maths will help you a lot with QC.

your second question can be solved with a few simple things:
1. find the direction vector towards the other entity
2. change position in that direction.

first:

local vector vec;
local entity e;

e = find the other entity you want to head ...
by necros
Mon Aug 15, 2011 12:54 am
Forum: QuakeC Programming
Topic: vp_parallel for a simple model!???????
Replies: 6
Views: 1984

there are many ways to get the player entity.

probably the simplest is to just use nextent.

nextent is a builtin function that will cycle through all entities. this is normally slow, but player entities are ALWAYS the first 4 entities, so in this case, it's extremely fast.

simply do this:

local ...
by necros
Sun Aug 14, 2011 7:23 pm
Forum: QuakeC Programming
Topic: vp_parallel for a simple model!???????
Replies: 6
Views: 1984

well, if all you want is to make a model 'face' the player, than it's just a matter of getting the direction vector from the model to the player, and then converting that to yaw, and feeding the yaw directly into the y component of the angles vector:


pl = player entity

local vector vec;
local ...
by necros
Sun Aug 14, 2011 7:10 pm
Forum: General Discussion
Topic: 8 bit bigmap Halloween special
Replies: 82
Views: 30729

fantastic, thanks!
by necros
Tue Aug 09, 2011 6:28 am
Forum: General Discussion
Topic: 8 bit bigmap Halloween special
Replies: 82
Views: 30729

do you know what causes this:
http://necros.slipgateconstruct.com/temp/qbism_tex1.jpg
http://necros.slipgateconstruct.com/temp/qbism_tex2.jpg

turning on r_fullbright removes the corrupted pixels.

i am using an unorthodox method of changing lightmaps for a lightning effect:
i create standard ...
by necros
Sun Aug 07, 2011 11:19 pm
Forum: QuakeC Programming
Topic: DP Rain effect
Replies: 4
Views: 1507

yeah, i'm after 'movetype_toss' behaviour, but it seems like there's no alternate rain effect with extra settings.
by necros
Sun Aug 07, 2011 6:48 pm
Forum: QuakeC Programming
Topic: DP Rain effect
Replies: 4
Views: 1507

DP Rain effect

is there a way to get it to be effected by gravity?
so i could spawn it with '0 0 0' initial velocity, and the drops would accelerate on their own?
or is it hard coded to just fall down at constant velocities?
by necros
Sun Aug 07, 2011 12:47 am
Forum: QuakeC Programming
Topic: path_corners and the z axis
Replies: 6
Views: 2436

you mean for spam?

so like, post 'hey guys' and then change it later to 'buy my crappy stuff!'?
by necros
Fri Aug 05, 2011 9:32 pm
Forum: QuakeC Programming
Topic: path_corners and the z axis
Replies: 6
Views: 2436

hey again. :)

i think it might be that there are some other requirements for z adjustment to work.

specifically, i believe the entity in the enemy field must have a movetype other than movetype_none, which is what path_corners have.

try setting movetype of path_corner to movetype_noclip. this ...