How Does Size Work?
#2825 posted by Inky on 2020/06/21 20:35:39
Hi everybody,
I'd like to put in some extra-large monsters to make usual lesser threats a far more scary danger.
From what I can see, seems the size is dealt with code looking like that:
setsize (self, '-32 -32 -24', '32 32 40');
where the 2nd and 3rd parameters correspond to VEC_HULL_MIN and VEC_HULL_MAX respectively.
Yet I can't figure out what the term "hull" actually refers to, nor how a size could possibly be "negative" (unless maybe it's lovecraftian non euclidean geometry brought in QuakeC by Shub-Niggurath herself???)
Your help to my comprehension would be extremely appreciated. Thank you a lot in advance ! :-)
Tale Of Two Halves
#2826 posted by Preach on 2020/06/21 21:27:02
OK, so this is a bit complicated. For almost all purposes, you have exact control over the bounding box of an entity - but the one exception is really, really important!
The normal bounding box is a cuboid which doesn't ever rotate as the entity moves. The two vectors are relative offsets - they say how far the corners of the bounding box should be from the origin of the entity. The negative ones put the lower corner to the left, back and below the origin of the entity, the positive ones specify a position to the right/front/above the origin.
Interesting to note that those parameters mean the origin isn't dead centre of the cuboid, the bottom of the bounding box is 24 units below the origin, but the top is 40 units above it.
One place where the exact bounding box is used is when colliding with...another bounding box. The exact size of the bounding box is also tested to check if traces from e.g. shotguns have hit something.
However, the one place where the bounding box is (sorta) ignored is calculating collisions against BSP objects. To run faster on Pentium 90s, Quake only computes the spaces that three sizes of object can fit around BSP objects:
• point-sized
• man-sized
• shambler-sized
The precomputed spaces are called "hulls". If the bounding box isn't one of those three sizes, the Quake engine picks a "best-fit" from the available hulls. If you want to get consistent collision, you have to pick one of those three sizes, and the constants are there to make that easier.
My Triviant
#2827 posted by madfox on 2020/06/21 22:23:25
r_drawviewmodel 1 makes a lot clear.
I try to make a monster launch an attack with three projectiles. One straight forward and two sideways parallel to the player. I studied Wiz_StartFast but I can't make the sideways parallel in line. The outside projectile always aims to the player, not aside.
Where should I start?
Thank You Preach!
#2828 posted by Inky on 2020/06/21 22:46:11
Your explanation is crystal clear and I would not have guessed that alone, thank you so much!
Now just need to find where the reference hulls for Hexen II are defined (I'm mapping for H2) and I'm done. :-)
Madfox
#2829 posted by Preach on 2020/06/22 00:26:31
Have you tried looking at the Hell Knight code? I think he does what you're asking for - just spread out over multiple frames instead of all at the same time...
Ah
#2830 posted by madfox on 2020/06/22 00:59:55
Yes Preach, that makes sense.
It don't has to be a simillar shot, although it would look fine.
#2831 posted by yhe1 on 2020/08/08 13:16:36
I will ask this for Madfox here:
So in version 2.38 of the chasm mod, the Mong does not react after being hit by a stratos. However, they will infight on rare occasions. But I cannot figure out what these occasions are. I managed to capture a saved game of them infighting, attached below, maybe somebody could take a look at it? This issue is really weird, monsters either infight or don't infight, but not infight rarely.
The saved games are here:
https://www.dropbox.com/s/1t1f4mi780x957w/chasm%20quake%20saved%20game.rar?dl=0
2.38 is here:
http://home.kpn.nl/lo2kf8/quake/Quasm_dev2.38.zip
Yhe1
I figured it out, tagged madfox on discord...
The monsters first frame of run animation has a ai_walk in it.... change it to ai_run and it works just fine.
#2833 posted by Drugod on 2020/08/10 10:33:22
Hi, everyone im doing my first code for quakec and I need some help
I would like make a 1920's wall lamp, my entity works but i would like instead a common light a flickering one, i use this code but seems doesnt works properly (compiling is ok), any suggestion? Thanks a lot in advance!
My code:
/*QUAKED light_torch_small_walltorch (0 .5 0) (-10 -10 -20) (10 10 20)
Short wall torch
Default light value is 200
Default style is 7
*/
void() light_wall_lamp =
{
precache_model ("progs/lamp.mdl");
setmodel (self, "progs/lamp.mdl");
FireAmbient ();
self.style = 3;
lightstyle(self.style, "mmmmmaaaaammmmmaaaaaabcdefgabcdefg");
makestatic (self);
};
How looks on quake
https://imgur.com/73NlC7s
Drugod
#2834 posted by metlslime on 2020/08/10 16:42:16
If you want to make a custom light style you should give it a new number not already used and place it with the other light style definitions (forgot where — world.qc)?
Then, it seems bad to hard-code the style in the entity spawn function since it prevents a mapper from changing it per instance in the map. You could do a check “if self.style == 0 then self.style = 3” which would let mappers use different styles but also add the convenience of if being automatic for lazy mappers.
Oh...
#2835 posted by metlslime on 2020/08/10 16:44:44
And I forgot, you have to set the entity style in the map editor anyway because it needs to be there for light.exe to set up the light maps correctly.
So just declare the light style in a centralized location with a unique number < 32 and then set it on the light entities in the map editor, and that should be it.
#2836 posted by yhe1 on 2020/08/26 08:15:08
I will ask two more questions for Madfox regarding the Chasm mod.
In Chasm mod 2.4. when the Faust fires a rocket, there is no explosion. I used to think that this issue is not a big deal, as there are tons of mods with Rocket Ogres and Rocket Grunts, but apparently it is not that simple. Madfox made a video of it here:
https://youtu.be/BL4vuKIl8N8
You can see there is no explosion.
The second question is that when one of the monster dies, its corpse floats in the air. I have provided two saved games, one with the creature alive, and another with the creature dead.
https://www.dropbox.com/s/dptouqamw0mgcmk/chasm2.4%20save.rar?dl=0
If somebody could take a look at these two issues it would be great. Thanks!
The chasm mod is found here:
http://home.kpn.nl/lo2kf8/quake/maps/Quasm_dev2.4.zip
#2837 posted by ws on 2020/08/26 08:47:34
Your link is dead yhe1
#2838 posted by yhe1 on 2020/08/26 09:18:21
Code Topic
#2839 posted by madfox on 2020/08/27 01:56:12
Link won't work, updated.
Have A Question About Something ..
#2840 posted by Rustydusk on 2020/09/04 00:59:56
Can we make quake player automatically move forward by players his own forward direction
Im really getting stuck about it please some one help me ı wısh i could ask a true question...
// Player Not Fixed
#2841 posted by madfox on 2020/09/04 01:48:24
I don't understand the question.
Do you want to get behind a player to move it foreward,
or do you need a code so you don't have to push a foreward button?
I don't want to offend you, but I really get stuck to understand your question.
#2842 posted by anonymous user on 2020/09/04 02:10:12
Yes second one i need an auto forward velocity code.i have a trigger and i want to player go forward automaticlally every time when player touch
And thank you
#2843 posted by anonymous user on 2020/09/04 02:20:33
I forgot to tell that player must go forward automatically by triggers angle and may can jump may be hide his weapon bla bla :)
Have A Question About Something ..
#2844 posted by Rustydusk on 2020/09/04 02:29:24
Code looks like this..
/*
===========
PlayerClimb
============
*/
void() PlayerClimb = //johnfitz
{
self.velocity = '0 0 160';
///The code that i want goes here
};
I Get The Question
#2845 posted by madfox on 2020/09/04 02:48:31
but wouldn't it be something equal to void() trigger_monsterjump in trigger.qc? //poor johnfitz
Have A Question About Something ..
#2846 posted by Rustydusk on 2020/09/04 02:49:10
I wrote a bit you must look previous posts
#2847 posted by madfox on 2020/09/04 02:50:10
lost
#2848 posted by anonymous user on 2020/09/04 02:52:55
What?
#2849 posted by anonymous user on 2020/09/04 02:58:37
İ will glad if you help me
|