News | Forum | People | FAQ | Links | Search | Register | Log in
Mapping Help
This is the place to ask about mapping problems, techniques, and bug fixing, and pretty much anything else you want to do in the level editor.

For questions about coding, check out the Coding Help thread: https://www.celephais.net/board/view_thread.php?id=60097
First | Previous | Next | Last
Play_sound_triggered 
spawnflag 1 = toggle 
That's The Bunny 
 
Whats The One 
for getting blood out of stones? 
Monster_silicon_vampire 
 
Toggling The Music... 
...was done as czg said - I simply played a nul.wav on the same channel if the user pushed the button. (It also re-set the music player queue to the same piece of music so that if the player pushed the button again, the music.wav played again and re-set the music queue to the nul.wav etc) 
Mike 
Thanks for the infos ! I'll try it ASAP. 
JPL 
Don't forget that I was doing this in my own FMB progs.dat, not Quoth and not the standard one.

If you want more details of my music_player module, let me know. 
Mike 
Oh... OK, I have to test it.. maybe it does not work with Quoth.. Let's experiment ;) 
The Forge? 
Anyone got a valid link to this site? It used to have some nice downloadable tutorials for setting up alot of the hipnotic entities. Specifically the Force Field ones, Id like to add these to a map I am working on and so far have not figured it out on my own.

Thanks, Fatty 
The Forge: The Legend Continues. 
The old link is dead. However I located an archived copy of the site. Enjoy http://web.archive.org/web/20000816012223/www.planetquake.com/worldcraft/ 
The Forge Is Still There 
at least for me, but PQ sites sometimes play hide and seek ... 
Fatboy 
http://shub-hub.com/files/tools/hipprogs_doc.zip
Docs and example maps for Hipnotic stuff. 
QuakeC Question 
So I'm hacking around with some stuff and have a question. I know QuakeC isn't object oriented so you can't call methods within entities but at the same ... man, that would be handy.

I find myself setting up stuff like changing an entities think function to point to a function where I can do something to the entity and then it changes it back to it's regular think. This works but it feels ... hacky and smells bad.

Is there a more elegant way to call functions on an entity that you've just spawned (for example) than this, or is this the only way and I'm wasting time benig annoying about it?

For example, say I have an entity that spawns a monster_army. I then want to call a function on that entity. This is how I currently do it:

myentity = spawn();
myentity.think = monster_army_myinitfunction;
myentity.nextthink = time + 0.01;

And then monster_army_myinitfunction will get called next frame. Which works. But it smells bad. Is there a better way? 
Yeah 
Would something along the lines of this do the job?

local entity temp_self
myentity = spawn();
temp_self = self;
monster_army_myinitfunction();
self = temp_self;
 
 
Interesting. I assume you left out a "self = myentity;" line though, right? 
Thanks Everyone! 
I looked around Shub-hub yesterday but I missed those files. Lunch hour rush I 'spose...

Anyone have a clue why the doors in my map arent playing their sounds at full volume? Im using BSP v 96d, and Im running Fitzquake080. No matter what sounds I assign it it is barely audible. Other sounds like jumping & weapons fire are fine. 
Arrgh, Yeah 
Yeah, I did.

If this initialisation function never needs to be run as a think function, then the alternative is to pass the spawned entity as a parameter to the monster_army_myinitfunction().

How that would go is you'd change the definition of that function to

void(entity grunt) monster_army_myinitfunction =
{
...
};


Then replace all instances of self in that function with grunt.

You'd then make your calling code look like:

myentity = spawn();
monster_army_myinitfunction (myentity);


As I mentioned above, the problem with this is that you can't then have monster_army_myinitfunction as a .think or .use function. If you like the suggestion in this post, it's cleaner code to my eyes, but you do need it as a .think at some point, then there is a way round that. Simply define another function like so:

void() monster_army_myinitfunction_self =
{
monster_army_myinitfunction(self);
}

and use that function as the think. The most frequently used example of this idea in the quakec code is SUB_Remove, which simply calls the function "remove" on the entity "self", making it possible for entities to remove themselves with use and think functions. 
 
Thanks Preach! It never even occured to me that "self" would be writable. Learn something new every day!

I'll give this all a shot tonight... 
 
As a follow up, what options do I have for doing HUD stuff in QuakeC on vanilla Quake 1?

Can I do anything at all? Even some text strings would be helpful. 
Not Really 
You're pretty limited. Your options for writing text strings are to centerprint them or bprint them. There are complicated ways of hijacking centerprint so that you can use some space for your own message, and still use the rest of the space for normal centerprints, but it's a pain to do in technical terms.

If you just need a few more weapon/powerup icons, you might consider using the -hipnotic or -rogue options, which are supported in all engines. The best way to see what extra icons they allow you is to just play about in either mission pack and see what new icons are added. Rogue adds more, but they're more complicated to actually use well. Also, both options will probably require you to rewrite some qc code just to make things look normal again. But since you're gonna mess with it to add your icons anyway, it's not that bad. 
Oh 
...and if the inside3d folks start going on about csqc stay well away. 
 
Heh, OK, noted.

That's why I was careful to specify vanilla Quake 1 so they wouldn't do that. We'll see.

Bummer about the HUD though. Oh well. 
Skeletal Animation In Quake. 
It can be done, with relative ease. Why haven't we seen it yet? The world may never know.. 
Well... 
All we need is an engine that supports it, a file format that implements it, and a modelling program that exports it.

Actually, this sounds like the sort of thing Darkplaces would support (it loads a lot of half-life, quake3, etc. formats.) 
Random Squishing 
What is it that the player sometimes seems to block a lift/door/train for no apparent reason (no obstacle in the way)? In most cases the engine only reports an 'unstuck' message, but sometimes it's more severe and the player's health is drained rapidly or he dies if the func's dmg value is high enough. This keeps happening even if all surrounding geometry is clipped off. 
First | Previous | Next | Last
You must be logged in to post in this thread.
Website copyright © 2002-2024 John Fitzgibbons. All posts are copyright their respective authors.