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
Madfox And Newboss 
The error means that you're calling the function newboss_stand2 before it's been declared. Because the function newboss_stand2 is further down the QC file than newboss_stand1, the compiler doesn't know that newboss_stand2 is a function. So it gets confused and stops compiling.

The way to fix this is normally to make what is called a prototype. This means putting the following line above the function newboss_stand1

void() newboss_stand2;

This looks a bit like the start of the definition of the newboss_stand2 function, but it doesn't have the function code itself. It warns the compiler we are planning to have a function called newboss_stand2 without defining it yet.

Having said all that, if you try this fix, you'll find that another error strikes, it will tell you that there is already a function called newboss_stand1. This is because you've included two versions in the qc file. Both of these functions do the same thing, but one of them is newboss_stand1 in the shorthand format:

void() newboss_stand1 = [ $stand1, newboss_stand2 ] {ai_stand();};

So delete the first one and leave the quoted one only. Then compile away and it should work.

You may now notice that all the stuff I wrote in the second paragraph seems to be contradicted, as the functions newboss_stand2, newboss_stand3 etc are all calling the following function without prototyping it. This is in fact the last benefit of the shorthand way of writing frame functions, it automatically prototypes the function self.think is set to. This is obviously useful as it allows you to write all the frames in the order they should play without having to prototype everything by hand. I omitted to mention this in the tutorial as I felt explaining prototypes would be too much digression. 
Thanks! 
for your answer. I tried with my poor understanding in qc to do as you said.
And indeed the newboss_stand2 gave me a new error.
Also deleting the first one brought me back to another error.

So I compared it with knight.qc and then I had this newboss.qc
http://members.home.nl/gimli/newboss.qc

The only thing it changed it has no errors, but shows newboss at it's first frame. In some way it won't loop to the next frame. 
Hurray! 
This one seems to work, although it is quiet a miracle to me, why I first have to shoot to make it animate.
http://members.home.nl/gimli/newboss.qc
For the rest it works fine!

YippY 
YippY 
That rocks 
Imagine 
a bulking reddwarf in a remote attack move that only starts shooting if I start...

sportive , but I can't kill it without making it flipping in it's start position. 
Freezeframe 
The reason why your monster freezes until you shoot it takes us on a long tour of the quake AI library. The source of the problem is that the monster spots you right away and so wakes up. However, since it has no attack or run animation yet, it stalls. If you turn on notarget before the monster sees you, you'll find that it animates just fine until disturbed.

So why does it behave differently once you shoot it? Well, it's all about how you change animations. One way of changing a monster's animation is to directly call a frame function like:
newboss_attack1();
or
self.th_missile();
This changes the current frame, and sets a new .think, so the previous animation is interrupted.

If self.th_missile is SUB_Null, then .think is unchanged, so the monster will continue with whatever animation it was doing before, like idleing.


The other way to change an animation is to just change the monster's .think field, like
self.think = self.th_run;
This means the current animation frame is held until the monster thinks again, but then it switches to the new animation. The problem is that if self.th_run is SUB_Null, it's already overwritten the next animation, so the monster freezes.

So as you may have guessed, waking up a monster changes its animation in the second way, the function to blame is HuntTarget in ai.qc. The reason monsters keep going is that their frame functions are always supposed to keep setting another think time and function. If you ever break the chain the monster gets stuck. .th_pain is called whenever damage is taken, which gives a way to kickstart the monster again. By this time the monster is already aware of the player, and so HuntTarget is not called again.

Of course, once the monster is finished it will have a th_run function, and so the problem will fix itself. 
Stand Up Frag 
To my surprise the newboss started animating fine, when I turned it around to give myself the chance for notarget.
And stopped when it spotted me.I suppose this should be the moment to make it
shoot a missile, and as there is no code it freezes.

After all my efforts I end up backwards, I had a freezing monster I could shoot alive, now I've got one that freezes in my sight.
I have made a somewhat different qc than in your tutorial, as I couldn't get the error log away.

But now I get a monster what dies as a stand up.I can't find a cause for this. It looks as the animation makes it attack, hurt and finally die with a strange eight frames to make it stand1 again.

I apreciate your patience to explain so clearfully the qc-code. Two days before I couldn't even believe such a thing could spawn into Quake.
I posted the newboss.qc again, maybe you can find the error? 
Hmmm 
Can you post or e-mail me the newboss.mdl file, so I can take a better look? I've tried compiling with a substitute model, but to try and find what's wrong with the animations I'd need to see the actual thing.

Also, don't worry that the qc file has changed from the one in the tutorial. That was actually my hope for the set of tutorials, that there'd be enough information that people could fill in the rest of their monster by comparing with the original quake monster files. The file as presented in the tutorial is certainly incomplete, and only really useful for previewing the animation. 
Alright 
after working on for houres, I came up to this point, an animating newboss, without defend, freezing in its last stand frame.

http://members.home.nl/gimli/bos.dz 
Frame Macros 
The first problem I see is that the order of the frame macros in the qc file doesn't match up with the order in the model. You need to have the frames in the same order in both. This is because quake doesn't read the names of the frames at all, it only reads the numbers. The frame names are purely to make the code readable, and the compiler just assumes that, eg. the 16th frame you list in the qc file is also the 16th frame in the model.

So rewrite the frame macro definition to:
$frame stand1 stand2 stand3 stand4 stand5 stand6 stand7 stand8
$frame attack1 attack2 attack3 attack4 attack5 attack6 attack7 attack8
$frame die1 die2 die3 die4 die5 die6 die7 die8 die9 die10 die11 die12
$frame hurt1 hurt2 hurt3 hurt4

and the death/pain animation should be fixed.

If you want to stop it freezing and instead react when it sees you, try setting
self.th_run = newboss_attack1;
in the spawn function. Also, if you don't want that stand animation to loop like it does, change the last stand frame function to

void() newboss_stand8 = [ $stand8, newboss_stand8 ] {ai_stand();};

Notice that this is newboss_stand8, and the nextthink is also newboss_stand8 - it calls itself. That way it freezes, but not in the same way, it's still thinking every frame, just not changing. I don't think this change would work well for an actual monster as it is, but it's something to experiment with. 
Yeah! 
I'm really knocked out by the fact for overseeing such a small logical factor.
For houres I stared the qc file, and the only thing I could find was another newboss.mdl in my progsfile with a base texture skin0 frame.

But this is great! Like with the rat it puzzled me so long what could make these monsters go. Again, thanks for your explanation.
Think I'll make me some extra frames for the stand animation.

I used a MOVETYPE_NONE to see if the monster should stand, but it seems to shamble away. 
Moving 
At the moment, it's the ai_charge(10) lines which are moving the monster, as that instructs the monster to move 10 quake units towards its enemy. ai_charge(0) would stop it moving there. You don't need to make it MOVETYPE_NONE, but if you do it shouldn't move at all. I don't think it will drop to the ground when spawned if you do that though, so be careful. 
Bosstype 
As it is a boss type in a lava suit it don't need to move. What I need now is a way to defend itself. Like giving it a missile to shoot.

I searched on Inside3d to look for some code to make it shoot. And although I found a lot of other fun stuff, the ai code soon made me aiai. 
I Think 
probably the easiest way would be to just use the ai_run routine but with 0 distance, because ai_run does all the useful things like checking attacks and whatever. cheap hack, but it works. :) 
Yeah 
I agree with necros on that one.

As for making the missile attack, I'd look at the code for the enforcer, as it has a fairly basic attack. The important functions are

Laser_Touch : This is what the missile should do when it touches something. The entity it touches is called "other", so you can see the function deals 15 damage to other.

LaunchLaser: This spawns the laser, sets it up visually, sends it in the right direction and speed, and sets its touch to Laser_Touch.

enforcer_fire: This works out where to fire the laser from and which direction to fire it in, then calls LaunchLaser.

enf_atk1 - enf_atk14: These are the frame functions that animate the model. Notice how functions 7 and 11 call enforcer_fire, for the double shot the enforcer fires.

You should also note that the enforcer's th_missile is set to enf_atk1. If a monster has a call to the function ai_run, it will evaluate whether it has a shot at the player, and if it does will call it's th_missile. If it doesn't have one then this does nothing, but if it does then it'll change animation and start firing. Try mimicking this at first to get a working projectile, then adjust it to make a more suitable boss attack(more damage, harder to dodge). Don't forget that you can use the same frame in several frame functions, so newboss_attack1 can have the frame $attack1. 
Well 
That explains a lot.
Sad I don't get the other side of the qc surroundings, as I could imagine for what these resulting scripting is relaying on.

I tried pasting the enforcer's qc into the newboss, but as I expected, it results in a
***enforcer.qc:42: Laser Touch redeclared
***enforcer.qc:105:LaunchLaser redeclared

I also made The Mage from 3Dinside, and although the qc scripts was totally different, it worked straightaway I wanted.

For me its pure magic how these different qc scripts obtain these effects!
I reckognize the functions of these declarings Laser_touch, but as soon as I use a void() opening a script I get redrawn by wrong punctuation.
While The Mage relays on 75% of the Vormit, it is still an Unique_New Model. 
Rename The Function 
in the newboss.qc, Laser_Touch to something like
boss_Touch wherever Laser_Touch appears in that file. You could just place the Newboss.qc after the enforcer.qc in the progs.src and remove the declarations in Newboss.qc, but since you are going to be changing the attributes of the function you might as well start with a new one. 
Vis Crash, Or Just My Imagination? 
Has anyone ever has vis crash while it was working? I ask this because, I have been full vising this one map for... 3 weeks now and it is still working on the same portal, for 3 weeks! I dont know if it crashed, or if its still working. And, would loading a map that has vis working on it disrupt vis, or make it crash or something? This is just getting ridiculous. I am using aguiRes latest utilites. 
Orl 
If the map is complex enough, it is definitely plausable to be stuck on a single portal that long. 
Orl 
Make sure vis is still running at full speed, check with Task Manager. Some OSs may pause the running application if you use the keyboard or mouse on the open console window.

It *is* unusual to be stuck in one portal for three weeks though, the longest time I've had was a few days. But so far it has always come through (at least on level 4).

How many leafs/portals do you have and how far has vis come? 
AguiRe 
From what I see in the task manager, vis appears to be running. It's taking up 50% of my CPU, and every once in awhile its mem usage goes up by a few K. Sorry, I do not know how many leafs/portals I have in my map, how may I go about checking? But I will tell you, vis is at 61.61% done so far. And, is vis saving its progress while its working on this portal, or only in between portals? 
Hmm 
Why only 50%, normally it should be almost 100, do you have a dual CPU?
#leafs/portals is printed at the first lines of the console/log file and you can also see it in the .prt file (just a text file).

Unfortunately, vis is not saving while working on a portal, only in between them. You can see the last save time on the file date/time stamp of the .vis file.

Also, there's a rough progress bar for slow portals, has it moved lately? 
Yeah 
I do have a dual CPU, which is a good because I can do other things while vis is running. According to the log, I have 4500 portalleafs and 15354 numportals.

And that rough progress bar you mentioned, it started at "--". It has not moved since. 
OK 
Then there doesn't seem to be anything obviously wrong, you just have an extremely unfortunate map from a vis perspective.

Either you'll have to sweat it out, or abort and try to find out what's causing this problem. You might want to try to add -v (verbose) and run again, vis will restart that portal.

My latest vis version will print out the coordinates for each portal *before* it starts processing it and you can then use this to find the portal.

The coordinates are taken from one of the vertices of the portal and should hopefully help you locate it. Just note that a portal can be very small or big, so it might be difficult to pinpoint it. 
50% 
Why only 50%, normally it should be almost 100, do you have a dual CPU?

I heard somewhere that CPUs with "hyperthreading" technology can't give more than 50% of the CPU time to any one process. At least I think that's what I heard; it's been a while. 
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.