#2411 posted by R00k on 2017/11/14 17:25:46
i've done this
void () execute_changelevel =
{
local entity tmp;
local float bcount;
intermission_running = 1;
intermission_exittime = (time + 5);
lightstyle(0, "f");// R00k: -added- dim light on intermission
oddly I assume the world uses lightstyle 0 looking in the misc.qc for the lights i cant find any reference for the actual numerical value, yet in world.qc, lightstyle (0,"m"); etc..
#2412 posted by R00k on 2017/11/14 17:51:01
wait ya, .style entity field is a lightstyle thus the world entity inits with self.style = 0;
Zero Style
#2413 posted by Preach on 2017/11/14 22:09:00
It's basically that, except it's the style field on the light entities which matters, not the style of the world entity. When you don't set a style, the field defaults to 0 - even in the light compiler.
#2414 posted by anonymous user on 2017/11/15 00:26:05
okay so basically all default lights use lighstyle 0 which is why altering
that to a lower value makes it look like nighttime? i set
that for intermissions and on any map it dims the screen
so the scoreboard shows up better ;) pr_lightstyle calls the svc_ to broadcast to all connected clients.
Cell Shading On Makaqu
so I wanted to implement cell shading in my game, and I'm using the makaqu engine because it has cell shading support but more importantly it can be compiled for the dreamcast (I'm making a game for it). When I asked the developer how to implement the cell shading he told me to edit defs.qc and add the line:
float EF_CELSHADING = 16384;
and add this to the model script:
self.effects = self.effects | EF_CELSHADING;
problem is, when I compile it using fteqccgui and place it in my mod pak it still doesn't have cell shaded graphics. I want to add the effect to the player model and the dog, so how would I do this?
Request For Details
#2416 posted by Preach on 2017/12/03 23:20:16
and add this to the model script:
self.effects = self.effects | EF_CELSHADING;
Can you give us a bit more of the context surrounding this line of code, like which function you've added it to? It wants to be in the function which is setting the model of the entity you want cell-shading on.
Cutscene Code For Commercial Game?
I’m looking for QuakeC code for creating cutscenes for a commercial project. I plan to ask whoever originally wrote the code for permission to use it for this, and it’s for a Dreamcast and PC game using the makaqu engine. If anyone can point me in the direction of code for this, I’d like to homogenenise it with my current code (I’m using a little bit of modified code since I can really only read C and C++) to play the beginning of a level. Is there anyone who can suggest some good code for this that’s relatively easy to use?
Another Question
Also, I’m putting commands in the world.c code for specific levels, but for some reason it’s not using them. I’m using cvar_set and localcmd. I need these for the game to work.
Nehahra
#2419 posted by Qmaster on 2017/12/24 20:14:51
NehQC:
http://www.fileplanet.com/dl.aspx?/nehahra/neh_devkit.zip
Are you putting those localcmd's inside worldspawn or startframe? If you use main() it might not work.
Thx! One More Question!
#2420 posted by daverising on 2017/12/29 20:25:12
Thanks for your answer! Another question, when I start a demo when the level starts, then the demo exits the level, the game crashes. However, it doesn’t crash the menu screen if I put in startdemo instead of startdemos it goes into the next level which I want this one to do. Is it because I have different cvars coded into both levels? I’m currently at work so I can’t test it yet, but just getting a second opinion.
Last Part
#2421 posted by daverising on 2017/12/29 20:27:54
I’m using localcmd to start the demo in the start level, which the demo is supposed to spawn the player in e1m1 after the demo plays.
Demo Hacks
#2422 posted by Spike on 2017/12/30 15:43:12
the typical way to chain demos to maps is to insert an svc_stufftext into the end of the demo to get the client to issue a 'map' console command at the end.
you can't use the changelevel command etc, so all weapons etc will be forgotten. you can work around that with cvars (again eg nehahra) but this makes a mess when it comes to saved games (and potentially restarting the map).
So Type It In The Console?
#2423 posted by daverising on 2017/12/30 20:27:05
So just straight up type in svc_stufftext map e1m1 into the console when I want the demo to end? Or do I have to code a timer?
Player Walk Animation Not Playing Right For Custom Character?
#2425 posted by Rizzoislandgame on 2018/02/06 04:31:32
so I have this coder and he and I can't figure out what is wrong with the code. In Darkplaces, the walking animation works fine, but when I switch to makaqu, it also combines with the attack animation! We don't know whats going on! Any help would be appreciated!
#2426 posted by c0burn on 2018/02/06 12:55:12
We will need to see your code. Are you using frame macros? Skeletal or vertex animation? Any QC extensions?
My Code
#2427 posted by Rizzoislandgame on 2018/02/07 04:27:02
Nevermind! Just Had Too Many Animations!
#2428 posted by Rizzoislandgame on 2018/02/07 05:47:44
Just found out that it had too many animation frames! We fixed it! Taking down drive file for security reasons
Explobox-induced Undead Leaping Fiend Bug
#2429 posted by Esrael on 2018/02/25 16:47:41
Hi guys!
In my upcoming map I have a problem with fiends when they (quite often) kill themselves by leaping at exploboxes. They do give the death sound and add to the kill total, but they kind of end up only half-dead:
-If not gibbed by the explobox, they will remain upright and solid and periodically turn to face the player and leap at them. The attack won't damage the player, though.
-If gibbed, the same behaviour occurs except with just the fiend's decapitated head! Delightful! @~@
Does anybody know if someone's already fixed the bug?
Explobox-induced Undead Leaping Fiend Bug
#2430 posted by c0burn on 2018/02/26 09:16:39
Multiple exploboxes?
#2429
#2431 posted by Spike on 2018/02/26 12:35:02
possible workaround:
make a second entity to surround the explobox, using the 'clip' texture so that the fiend can't hit the explobox itself, and thus can't zombify itself.
add a trigger_once entity inside the explobox and give it a health value, and have it killtarget your clip entity, so that the artificial blocker doesn't continue blocking after the box explodes (unfortunately the explobox doesn't do target/killtarget stuff, hence the separate trigger).
any qc mod that fixes the chained-explobox-not-chaining bug should have also fixed the zombie-fiend bug thanks to adding a small delay before the explobox itself fires.
#2432 posted by khreathor on 2018/02/26 13:49:43
chained-explobox-not-chaining
I heard about this earlier. Can you give more details where and why this happens?
#2432
#2433 posted by Spike on 2018/02/26 16:46:18
the explobox's th_die function calls T_RadiusDamage which calls findradius, which calls another explobox's th_die which calls findradius again, which clobbers the first findradius's chain causing it to not see the ents that it should have. You can see this on e3m1 I think it was.
The solution is to add a small delay between the th_die and the T_RadiusDamage.
This additionally fixes a stack overflow crash, as well as this fiend bug, and imho looks a little nicer when a group explodes over time, instead of all at once.
Unfortunately there's not really anything an engine can do to fix this (short of ugly hacks that rewrite the qc at load time). Increasing max stack depth delays the crash but still doesn't allow you to have 10000 exploboxes in a domino-run sort of layout...
I guess you'll have to do that with spawns instead...
#2434 posted by c0burn on 2018/02/26 17:52:18
This bug is fixed in URQP. I'd suggest looking at its source, especially misc.qc and combat.qc.
http://www.quaketastic.com/files/misc/urqp106a.zip
No More Zombie Fiends
#2435 posted by Esrael on 2018/03/01 18:41:30
Thanks a lot for your help, Spike and c0burn!
Since my map already has custom code in it (to enable some custom decorative models), I solved the problem the qc way: I simply copied the explobox-related code from the URQP misc.qc, so now my barrels explode in a cool domino style (but still almost instantaneously for it to feel vanilla enough)! B)
The only problem is that the fiends no longer deliciously gib to pieces when they kill themselves by leaping into a bunch of barrels. :'( I did lazily check if URQP had a more "vanilla" solution, fixing the zombie fiend issue while still retaining the instantaneous explosion chaining, but I couldn't be bothered enough. Did you have something in mind, c0burn, when you referred to combat.qc? o: Oh well, better having less gib-inducing barrel clusters than having some solid "ghost" fiends (or their heads) leaping about.
I also gave Spike's "clip shield" workaround a try, but my memory served me well as I recalled that the clip texture can only be used on world brushes and func_details, it seems. Not even info_notnull or InitTrigger trickery fooled qbsp to compile the brush. :/ I even tried giving the func_detail brush a targetname and tried to killtarget it with a trigger, but nothing worked.
Anyway, the delayed barrel chain explosion fix is a good enough workaround for me. Thanks again! :)
|