Thanks Preach
#10587 posted by Mic Hey on 2010/12/05 15:42:34
Problem is: I put info_cam and trigger_cam entities in my map but when I touch trigger nothin happens !
Do I need to edit other qc files beyond my cam.qc ?
Can you explain me better how much additional work is needed ?
ps: I know custents, zerstorer,... but since I've already successfully added things in my progs I'd really like to insist !
Amazing ! Now My Camera Works (..partially) !
#10588 posted by Mic Hey on 2010/12/05 16:58:30
..With my cam.qc code above I obtained this:
When player touches "trigger_cam" the view moves to "info_cam" (as I wanted) BUT still there's player weapon, crosshair on screen and mouse-look active (I don't want these for a camera view obviously !)
..SoMe HElp ??
Camera Code
#10589 posted by Mike Woodham on 2010/12/05 18:06:23
Some bits here may help (from custents code)
/* This routine short-circuits player turning movement while
in camera mode.
*/
void() look_ahead =
{
self.angles = self.enemy.mangle;
self.fixangle = 1;
self.nextthink = time + 0.01;
};
void() go_camera =
{
// Change the player into a camera
self.classname = "camera";
self.velocity = '0 0 0';
self.view_ofs = '0 0 0';
self.angles = self.enemy.mangle;
self.fixangle = 1; // turn this way immediately
self.movetype = MOVETYPE_NONE;
self.takedamage = DAMAGE_NO;
self.solid = SOLID_NOT;
self.weaponmodel = "";
Yeah
#10590 posted by Preach on 2010/12/05 18:39:00
Mike's code will help with disabling mouselook and the viewmodel. You need to set each player's think function to look_ahead for the duration of the cutscene. Make sure that players cannot attack during a cutscene either - that would be bad in it's own right but also resets their think function so breaking this section of code. Alternatively move the code from look_ahead into PlayerPostThink to be run only during a cutscene (this has the bonuses of allowing player entities other think functions and also working even if the player exceeds 100 frames per server second - which is possible if you start applying slow motion)
The crosshair is not possible to fix in a way that won't annoy some players. You could use stuffcmd to send "crosshair 0" to a player's console, but then if you blindly turn it back on you've reset the variable for players who want the crosshair off normally.
If you use cvar to try and read the setting, you'd run into trouble with players in co-op - cvar reads the server setting instead of the clients. I suppose you could compromise and use that method in single player so the crosshair disappears and is restored, then disable that code path in co-op.
The next problem is that you need to restore the player when the cutscene ends, which the code from info_intermission does not make provision for(since players go to the next map afterwards). This may be some work, or it may be simple depending on what state the player will be in after the cutscene.
I mentioned co-op in the crosshair part above - it's a corner case a lot of people forget about when coding things that affect the player - sometimes there are more than one at once! So you may need to review your code for other places where this assumption might break down. For instance, do you want to trigger the cutscene for all the players when one of them touches the trigger? If not, what does a player who's viewing a cutscene look like to players outside the cutscene, etc...
Oh? Coop ?
#10591 posted by Mic Hey on 2010/12/05 19:12:58
I'm a beginner with qc and my maps are singleplayer only so probably I'll pass on that :(
After cutscenes how can I change level ?
..maybe with stuffcmd's ?
Intermission
#10592 posted by Preach on 2010/12/05 19:28:37
If you want to end the map straight after a cutscene then you've saved yourself lots of work. You can adapt the original intermission code for that - just trigger the level change at a signal from the end of the cutscene rather than when the player presses fire.
Thanks Preach..
#10593 posted by Mic Hey on 2010/12/08 16:01:32
..What kind of changes are needed in qc if I want to restore player position/view after a cutscene ?
Write A List
#10594 posted by Preach on 2010/12/08 20:12:07
You need to run through your code and write a list of everything it changes about the player. So you mentioned position and view angle in your post, add them to the list. viewmodel was reset by the code, so that needs to be included too.
When you have your list, you need to decide which of these things you need to remember the previous setting of, and which you can just recalculate. For instance, you probably can't know where the player used to be standing without storing it in some variable. But you know that the player's viewmodel can be worked out based on the weapon he currently has (stored in .weapon).
For the former category, you need to store the value in another field on the player for the duration of the cutscene - for instance create a new vector field called .prior_origin. Once this is defined, go to the place in your code where you first trigger the cutscene, and store the origin at this point in your new field. Repeat for all the other fields.
Finally, when you end the cutscene you need to restore all of these fields to their pre-cutscene values. One in particular to take care with is the origin - don't set it directly as this will cause bad things to happen in the engine. Instead call
setorigin(self.prior_origin);
which will do things right. For things like the viewmodel, recalculate it based off the player's weapon.
That's probably enough to be getting on with, so come back when that's done and I'll start throwing some more stuff to think about.
I've Studied First Half Of QuakeC Manual By D.Hesprich..
#10595 posted by Mic Hey on 2010/12/09 05:44:22
..problem is I'm not sure on going on with 2nd part !
I'm indeed a better mapper than coder.. eheh
-My first idea was to use Nehahra progs.dat because of fog support, script actors,.. but I dont want people need another mod to play mine.
Question: if I mod for Nehahra what files I have to include in the final ".pak" for people to play it? Nehahra progs only?
You Dont
#10596 posted by RickyT33 on 2010/12/09 12:37:04
You just say "Nehahra Required", then the person can download Nehahra, install your map, run Nehahra, then run your map :)
You tell them to run Quake with the commandline "quake.exe -game nehahra +map yourawesomemap"
Fog
#10597 posted by ericw on 2010/12/09 19:33:03
You don't need an external progs, just set a key "fog" on worldspawn with the value "density r g b" where the density/r/g/b values are between 0.0 and 1.0. Most modern engines should recognise this.
I don't think anyone will object if you make a Neharah map :-) (e.g., a lot of recent maps require the Quoth expansion pack.)
I Understand..
#10598 posted by Mic Hey on 2010/12/10 02:43:24
..but I liked the idea of having my mod requiring nothing else..
-Since my mod is a partial conversion I was thinking of make it standalone(selfinstalling .exe )
But I dont know how to do it.. suggestions ?
Don't
#10599 posted by jt_ on 2010/12/10 05:48:15
What Jt Said
#10600 posted by rj on 2010/12/10 18:12:33
in all my years of downloading and playing quake mods i have never come across one that required a self-installing exe. it just isn't the done thing. everyone should know how to install it manually from a zip file by now!
if you want to use the nehahra progs you MIGHT be able to get away with just requiring the progs.dat file depending on what features you use. try copying it into its own directory (eg. c:\quake\mymod\progs.dat) and running quake -game mymod, then whenever something like a sound or model is reported as not found, you can move it across from the nehahra dir to yours. but ask mindcrime's permission before distributing it!
Please Help
#10601 posted by delor3 on 2010/12/12 16:33:34
..my idea is to have in my map many different skinned monsters per class (4 or 5 soldiers with different colors, 4 or 5 knights, ..)
Easiest way to achieve this ?
-I'd happily skip the creation of every different skinned monster in qc code(since I want to change only clothes color for each!)
It Id Possible To Do This Using Qc
#10602 posted by RickyT33 on 2010/12/12 16:41:09
You will have to make an mdl with several different skins included, and edit some qc so that you can add a different flag to each differently coloured monster.
Lol - I'm no coder, but a (very) long time ago I managed to make a mod which had painskins in it. inside3d.com will have necessary tutorials :D
Oh Thanks Ricky
#10603 posted by delor3 on 2010/12/12 16:59:15
I know of your fame.. though I haven't played any of yours yet..
actually I've just finished with a giant dvd(8gb) full of whole Quake maps goodness, all sorted by authors(!) that I'm going to play in the ..next years
Back to my question:
yes what you say is right and I'm sure having seen somewhere a patch like that
but I'm trying to stay away from qc afaic :)
Skins
#10604 posted by Mike Woodham on 2010/12/12 17:41:00
As long as you do not want different action (AI) for different skins, just ensure that your mdl has skins and set "skin" "1" (or 2 or 3 or however many you have) from the editor. The default skin is "0".
If you set an incorrect number you will see the monster with a black/cyan patern but it will behave as normal.
There are many standard Quake monsters already out there with several skins per model.
Q3 Editor Under Win 7
#10605 posted by ziffon on 2010/12/14 14:10:29
It's been a few years.. Anyway.. What is a good Q3 editor to use under Win 7? A quick serch on google for GTK gave me some limited results.
Thanks
NetRadiant
#10606 posted by jt_ on 2010/12/15 01:16:39
NetRadiant Shaders
#10607 posted by ziffon on 2010/12/15 11:09:23
Awesome! Got the editor now. However, It cannot find the shaders. I get this error when starting editor and flushing shaders.
Parsing shader files from C:/Program Files/Quake III Arena/baseq3/scripts/shaderlist.txt
Couldn't find 'C:/Program Files/Quake III Arena/baseq3/scripts/shaderlist.txt'
Loaded Texture: "C:/Users/jstenkvist/Desktop/netradiant-20100214-win32/bitmaps/notex.bmp"
Any ideas?
Q1: Triggered Explosions
Looking to create some explosion effects around something (ie in thin air). Using Quoth at the moment, and Breakables are nice but I'd like to have explosions without the object in the centre.
Any suggestions?
Info_rubble
The Imp
#10610 posted by Mike Woodham on 2010/12/15 22:30:11
Time dulls the... err...
Anyway, I used the Imp in FMB_BDG and I can see that I made a couple of changes to the code. I can also see that I have got left and right handed throws for the missile launch. Trouble is, I cannot see any frames for a left-handed throw. In addition, I can see a set of 'swoop' frames but no related code.
I guess I have a bastardised imp.qc. Is there a definitive code out there anywhere - I do not know now where the Imp first appeared, or where I got the code from.
Anyone able to give some pointers?
Zealousquake
#10611 posted by madfox on 2010/12/15 23:10:31
@tzealousquake - the extra mod has exploding barrels and sprite_emmitters, rather a lot of explo experiences.
http://www.quakewiki.net/quake-1/mods/extras-r4
|