Preach
#3545 posted by blaGGer on 2005/04/19 13:28:25
Well, I am quite pleased because I managed to find your error tutorial hidden in the shambler.qc file ;-)
monster_shambler_tele_set
and
monster_shambler_set_tele
I stared at it for a long time before I could see it!
I didnot try the progs.dat supplied as I was adding some code so I cannot say if is OK or not. But it compiles good now and works fine. Thanks again.
Lol
#3546 posted by Kinn on 2005/04/19 13:31:39
Holy Fuck,
#3547 posted by - on 2005/04/19 14:15:00
a new record!
blaGGer, please don't hit submit a bunch of times, or refresh or whatever the hell you did.
Hahahahahahaha
#3548 posted by pjw on 2005/04/19 18:31:18
A dectuple-post!!
Hell yeah. If you're going to do something, then by golly, just go all out with your bad self.
I'm home sick today and feel kind of shitty, and that made me feel better.
#3549 posted by madfox on 2005/04/19 21:12:05
I am not in the trunc dreath?
I am not in the grunt breath?
I am not in the drunk thread?
Blagger Is Just Simply Quite Pleased!
#3550 posted by Friction on 2005/04/19 22:15:09
;-)
Sorry, Sorrry, Sooorrrry
#3551 posted by blaGGer on 2005/04/19 22:43:41
So sorry times many times!
BlaGGer
#3552 posted by JPL on 2005/04/19 23:06:48
I really think you need to take medical advice from a neurologist to solve your restlessness problem... believe me... ;)
Flawless Victory!
#3553 posted by Lunaran on 2005/04/20 09:04:01
blagh!
Trigger_teleport Sound
#3554 posted by blaGGer on 2005/04/22 15:40:30
I there a problem with the SILENT flag in the trigger_teleport routine as it makes no difference if it is set or not.
I am looking in the triggers.qc file and the only reference I can see is
if (!(self.spawnflags & SILENT))
Is that right? & or ==
Silence Is Golden
#3555 posted by Preach on 2005/04/22 16:09:38
It may be that the flag is working, just not how you expect. Silent teleporters still make the noise when something teleports in, they just don't make the ambient teleporter hum near to the trigger. It's intended for trigger_teleports that sit outside the main level, for teleporting monsters in, as the sound out there would be pointless, unless it spilled over into the real level, which would be confusing.
Preach
#3556 posted by blaGGer on 2005/04/23 01:00:42
What I am wanting is for no sound at all when I teleport my extra monsters in. I am happy for there to be sound when the player uses a trasporter. I have some triggers that teleport monsters into places the player has been to once and I do not want the player to know that by hearing sounds.
I thought that was what the flag SILENT was for . Can you guide me how I may stop the teleport sound?
The Sound Of Silence
#3557 posted by Preach on 2005/04/23 11:11:14
Ok, the first function to look at is play_teleport, which selects a random teleport sound and plays it. However, we cannot change this function, because it is a think function for a temporary entity. This means we have no way to check whether it was spawned by a trigger_teleport that is silent or not. So, we need to look at the code that calls this bit.
The next function is spawn_tfog, which spawns a new entity s, who's only purpose is to play the sound in the right place in 0.2 seconds. Ideally we would have an if statement around that spawn function, but again we can't be sure what function has called spawn_tfog. If it was the trigger_teleport, then we'd know the trigger was the "self" entity. But another entity might call spawn_tfog, and so modifying this function might cause problems in other places.
So, we go back one more function, to teleport_touch. So, above this function add the line
float NONOISE = 4;
This is just defining a new constant for the flags on a teleporter; if you set flag 4 then the trigger_teleport, then anything teleported will be silent.
Then go down into the function, and find the lines
makevectors (t.mangle);
org = t.origin + 32 * v_forward;
spawn_tfog (org);
and replace it with
if(!(self.flags & NONOISE))
{
makevectors (t.mangle);
org = t.origin + 32 * v_forward;
spawn_tfog (org);}
Notice that this gets rid of spawn_tfog totally, so you get no flash as well as no sound. I assume that if the monsters are meant to teleport in without informing the player, no teleporter flash is needed.
If you did want silent teleports that included the flash, you'd need to add
else
{
makevectors (t.mangle);
org = t.origin + 32 * v_forward;
spawn_tfog_silent(org);
}
after the if statement, and make a copy of spawn_tfog called spawn_tfog_silent, which omitted the sound spawning lines.
As a side note for mappers, it turns out that play_teleport is a function like barrel_explode that can be called by the func_notnull trick. So if you want to spam false teleport sounds at the player, you now have the power! Well, I'll confess I've not actually tried it in a map, but it looks like it should work.
#3558 posted by buy viagra online order on 2005/04/24 09:11:46
[deleted by metlslime]
Cough
#3559 posted by Vondur on 2005/04/24 09:24:59
cough
Crosbow
#3560 posted by madfox on 2005/04/24 12:14:44
I managed to change the v_shot gun mdl into a crosbow. Now I want to make it shoot arrows. So I made the crosbow.mdl of 7 frames, and one arrow.mdl for the arrow.
Now it comes to qc and I knew this would be a hard one for me. I've been looking to the 3Dinside for one, but I could only find thowing axe to compare. But the zip file link is lost. Is it really much coding to make it go?
http://members.home.nl/gimli/frame3.jpg
Bows And Arrows
#3561 posted by Preach on 2005/04/24 15:12:22
I'm not gonna do a detailed how to here, be warned, but rest assured it's not too hard. Have a look at the code for firing nails, it's pretty close to firing an arrow. Just copy and rename the nail functions, and change the model, the speed and the damage. Then in the weapon firing code, change the fire function for the shotgun from the current one to the new arrow one. Let me know if anything goes wrong, or if you wanted different behavior from that of a nail.
Great!
#3562 posted by madfox on 2005/04/24 15:59:49
I was allready looking to older examples of the Phenomenon CD. But with this I can go on for a while.
Glad to have this little help, because c coding for me is almost as hard as writing a full sentence without spelling problems!
#3563 posted by generic viagra alternative on 2005/04/25 00:41:11
[deleted by metlslime]
MadFox
#3564 posted by JPL on 2005/04/25 04:52:59
Are you trying to "rebirth" hexen weapons ?
Knew It Won't Be Easy
#3565 posted by madfox on 2005/04/25 12:58:57
I don't think the shotgun has a substantive bullit?
By now my only progress is replacing the s_spike.mdl for an arrow.mdl
Then the supershotgun shoots arrows, while the nailgun still punshes nails.
But that's no true code afterall.
I Understood That.
#3566 posted by metlslime on 2005/04/25 14:14:15
Arrows And Stuff
#3567 posted by Preach on 2005/04/26 13:31:49
Ok, the full walkthrough on coding the arrow in.
Find
void() W_FireSuperSpikes =
and duplicate the whole function, renaming the copy of the function to W_FireArrow
In this version of the function, replace the model of the spike with the arrow model and either find a suitable sound replacement or just delete that line. Change the line
newmis.touch = superspike_touch;
to
newmis.touch = arrow_touch;
and
self.currentammo = self.ammo_nails = self.ammo_nails - 2;
to
self.currentammo = self.ammo_shells = self.ammo_shells - 1;
Copy the function void() superspike_touch = and paste it about the W_FireArrow function. Now rename it as arrow_touch. Here you can set the damage you want the arrow to do, replace the two instances that say 18 with whatever damage you see fit : -).
Finally, go down to the function W_Attack. Find the line
else if (self.weapon == IT_SHOTGUN)
{
player_shot1 ();
W_FireShotgun ();
self.attack_finished = time + 0.5;
and change it to
else if (self.weapon == IT_SHOTGUN)
{
player_shot1 ();
W_FireArrow ();
self.attack_finished = time + 0.5;
Note that the weapon is using a single shell each time it fires. If you want to change what kind of ammo it uses you need to poke around in lots of different functions, even more if you want it to use multiple shells in a shot. So let me know what you had in mind ammo-wise and I'll get back to you.
Kind
#3568 posted by madfox on 2005/04/27 09:30:15
you took the time to give me some attention!
I was already working with a weapons.qc from "Freak" in his Firepower addition.
He had a progs.dat which was working right, but the client.qc and weapons.qc didn't work.
I'll try this code, and let you know how it goes.
Preach
#3569 posted by blagger on 2005/04/27 12:24:23
Thank you.
I like your training methods-
if(!(self.flags & NONOISE))
should be
if(!(self.spawnflags & NONOISE))
Just like last time I stared at it not working for a long time before I saw the problem. I found it so I must be learning!!
But I am still very grateful for your help and I am still thanking you and you are helping others as well. Well done.
|