#2268
#2269 posted by Spike on 2017/02/22 11:18:49
surely that doesn't even compile...
Well
#2270 posted by madfox on 2017/02/22 21:04:33
it does, and it has a rather fancy skinn anim as the model in screenshots #14579 shows.
Why it is I don't know. I thought anim skin wasn't possible.
I think I screwed up the blrg.atk1 and balrog.atk names.
I thought the knight.qc and hknight.qc were ttached somewhere to the statue code only.
Found It
#2271 posted by madfox on 2017/02/23 00:02:58
missed semicolon.
Angles_x Question
#2272 posted by gland on 2017/02/27 00:46:03
Hi, please refer to this post where I describe a difference I found between how NetRadiant interprets angles versus how Quake 1 does (with regard to the orientation of models):
http://www.celephais.net/board/view_thread.php?id=61357&start=75
relevant image here:
http://i.imgur.com/KpBsWHB.png
I assume NetRadiant is geared up to conform to Quake 3's interpretation of angles. Is there a difference then between how Quake 1 and 3 do it - namely to do with angles_x being inverted?
#2273 posted by Spike on 2017/02/27 01:58:25
inverted pitch angles is an 'unfixable' clientside bug that was present in the original software renderer, that was replicated in glquake and all quake engines since.
bsps and sprites pitch correctly - like in *Radiant, and mdls (and by extension md3+iqm - hurrah for consistent inconsistencies) pitch the wrong way.
makevectors uses 'proper' angles, but vectoangles is also affected by the bug.
it was fixed for hexen2 and quake2, but if you want to run quake mods properly then things must remain 'broken', especially if you want to join a public server.
probably the easiest way to deal with it is to create two separate entity types or something, then the mdl/md3/iqm version can just do self.angles_x *= -1.
there shouldn't be any other angle issues, just that one.
Spike
#2274 posted by gland on 2017/02/27 11:19:04
Thanks - very useful info.
#2275 posted by R00k on 2017/02/28 02:37:26
"I just literally pulled all the precache calls from worldspawn out into a new method:
void precacheSounds() =
"
are you still calling precacheSounds() within worldspawn or else where?
Calling It In Worldspawn Exactly Where The Precaches Were Originally.
#2276 posted by czg on 2017/02/28 09:03:26
Randomized Velocity In A Range
#2277 posted by Bloodshot on 2017/03/01 03:31:21
Forgive me if this is more a general coding question but, is there a way to find a random number within a certain range? Like if I want a randomized x velocity from 150 to 300 for a gib
Or Rather
#2278 posted by Bloodshot on 2017/03/01 03:32:37
-150 to 300, sorry for not editing, forgot i had a login
#2278
#2279 posted by Kinn on 2017/03/01 03:41:20
(Random() * 450) - 150;
where Random() returns a random number from 0-1 - i assume QC has that?
A Better Answer
#2280 posted by Kinn on 2017/03/01 03:45:44
so yeah the general case for getting a random number between min and max is:
(random() * (max - min)) + min
where random() would be a builtin function returning a random number in the range 0-1
Thank You
#2281 posted by Bloodshot on 2017/03/01 04:01:56
How do i put a negative number in there? Like say i want a range from -250 to 250
#2282 posted by Kinn on 2017/03/01 04:06:04
It's no different, "min" is -250, "max" is 250, so that would be
(random() * 500) - 250
Thanks
#2283 posted by Bloodshot on 2017/03/01 04:12:48
First time i did it with negatives i must've entered something wrong, now it's working thank you
Any Way To Set Model Flags Through QC?
#2284 posted by Bloodshot on 2017/03/01 06:14:58
Hexen 2 has some extra model flags for trails that I can't set unless I merge models with QME, but I still can't get exactly what I want
@bloodshot
#2285 posted by Spike on 2017/03/01 10:20:20
random:
random(-250, 400) will give you a random number between -250 and 400.
this will work with any HexenC compiler, as well as fteqcc even when not targetting hexen2.
model flags:
fte and dp both have some .float modelflags; field.
unfortunately the networking only supports the first 8 bits, and isn't supported by any (non-fte) hexen2 engines, so it won't get you anyhwere.
you may need to resort to a hex editor. you want the 32bit int at offset 0x4c.
although I'd like to think that later versions of qme allowed setting arbitrary flags...
Good Point About QME
#2286 posted by Bloodshot on 2017/03/01 23:03:18
I've been using 30 because I couldn't find the download again for 31, but I think I might be able to grab it from my laptop and check
#2287 posted by R00k on 2017/03/02 04:48:50
i seem to have 3.1 ill look for a zip or i can make one i guess. I know i have it somewhere
#2288 posted by muk on 2017/03/02 04:52:45
#2289 posted by PRITCHARD on 2017/03/02 11:24:59
It's been about 5 months since the last time this was asked, that's a pretty good run I guess. Maybe six next time? :p
Can You Make Anonymous Functions In Qc?
#2290 posted by anonymous user on 2017/03/04 15:12:07
Fteqcc
#2291 posted by Spike on 2017/03/04 15:37:08
void() foo =
{
entity e = spawn();
e.think = (void()){
dprint("I THOUGHT!\n");
remove(self);
};
e.nextthink = time + 1;
};
such functions may still have undefined behaviour when it comes to saved games, especially when the progs itself is changed. so while you should probably still avoid it, the above works in most cases.
note that there's no enclosures - so you can't access the locals of the parent (static locals should work though).
+1 Sticky This Thread
#2292 posted by Qmaster on 2017/03/06 18:28:51
#2293 posted by PRITCHARD on 2017/03/06 22:27:06
Make the thread sticky on its 10 year anniversary.
|