News | Forum | People | FAQ | Links | Search | Register | Log in
Coding Help
This is a counterpart to the "Mapping Help" thread. If you need help with QuakeC coding, or questions about how to do some engine modification, this is the place for you! We've got a few coders here on the forum and hopefully someone knows the answer.
First | Previous | Next | Last
 
Thanks I got the probe working now with your code. One odd thing is that it won't start moving until the player looks up first. As in, you can't activate the probe and immediately start moving forward. Is this how it originally was supposed to work? 
That Dang Probe! 
Something is eluding me here. I can make it it function, but only after the player looks straight up. I've even tried using code from spawning rockets to try and make it begin further out. I'm missing something. Any other ideas? 
 
No problems here, Legend.
I push the use button and right after that the fire button and it starts flying without even moving the mouse. It doesnt matter if I look straight, a little down or upwards.
Sorry, you must have done some wrong copy/paste.
I used the exact same lines I gave you.

Just in case, be sure to not use a previously saved game with your new progs.dat as the gamecode has been changed. Always start a new game/map and test.

Even in that tiny place at the start of map d2 it works as it should. I am using QS 0.93.
Try harder Legend :) 
Malice Probe Code 
Thanks. I'm using the same version of QS. Could you possibly look at my code and let me know where I went wrong?

https://docs.google.com/document/d/1TKd9WRx6-rxw-tqALcaaAm81w5_OnUsOLCE09z4reuA/edit?usp=sharing

Thanks. 
 

self.probe_sound = time + random() * SVC_SETVIEWPORT;


Gotta love decompilers. :)
All those assignments to unrelated constants from defs.qc makes it really hard to read. Consider changing them because that'll be way more appealing for anyone willing to help. 
C´mon Legend ... :) 
I wrote:
"
So, what you want to do is, open probe.qc and add after: setmodel(self, "progs/probe.mdl");
this line: setsize(self, VEC_HULL_MIN, VEC_HULL_MAX);
"

Unfortunately you added the new line at the wrong place. You must read more carefully.

You added the line after:
setmodel(probe, "progs/probe.mdl");
That is NOT:
setmodel(self, "progs/probe.mdl");
You set the model to the wrong entity.
probe is not self and self is not probe. ;)

You should not change model or size to different entities in one code block. That awakes evil things and the shamblers will hunt you for that :P

I am sure you can fix it by yourself now. Just reread post #2448.

Also, you still have the russian text inside your code...

Best wishes my friend.
And many greetings to osjclatchford. 
Doh! 
Ugghh. Of course it was just a simple silly oversight by me.

I cannot find any more russian in the probe.qc. I'm sure I may still be missing some in the rest of the files. Though. Which is my blind ass missing in the probe.qc though?

And btw, who is you is? Seven? Dutch? And how do you know I've been talking with osjclatchford? Are you psychic? A sorcerer? :O

Anyways, thanks again for all your help and explanations. 
 
What's up Legend!

Nope, it's not me. But I happened to see my name pop up, thought I'd say hi. I haven't been on the quake scene much anymore since Quakeone took a nose dive. I might jump back in after a while. Good to see you're still honing your code skills. 
A Newbie Here 
As some of you may know (including otp),this is ijazz2,except it's been a long time,with me having school and also getting selected for some NASA competition which means I go to LA from India in 2 months.Did I mention I forgot the password for ijazz2?

I have a small question.

How do I get weapons to replace other weapons?
(examples:Warhammer from Quoth,Axe<->Sword->Mjolnir from Drake)

I understand that this may take me a very long time to learn,but I am willing to do this.

Also,OTP?
I'm sorry for trolling. 
 
are you asking how would you put a different weapon in game? or are you asking how do you have multiple weapons bound to the same key on the keyboard? 
Shamblernaut 
I am asking this:
If Ranger has an axe and he finds a sweet chainsaw,he picks it up,right?
But he has to drop the axe to have the saw.

In straightforward language:
How do I make the player replace the axe with another weapon on pickup?

As I mentioned,examples:
In Quoth,when you pick the Warhammer up,you lose the axe.

In Arcane Dimensions,you lose the regular axe when you pick the shadow axe up.Same goes for the SSG to Widowmaker and Thunderbolt to Plasma Gun.

In (whatever has been released) Drake, the chainsaw replaces the axe.
The sword and the axe replace each other on pickup(both have the same stats;only model differs)

Nailgun is replaced by Super Nailgun

Blaster is replaced by Laser Cannon

Weapons bound to the same key are there in an InsideQC tutorial,so I don't need to worry abotu that.Anyway I'm not gonna have multiple weapons on one key. 
 
self.items is where an entities items are stored.

What you'll want to do is remove the existing (to be upgraded) weapon from the players inventory, and then add the new weapon.

items.qc is where this is handled and item names are defined in defs.qc.

it should be fairly simple to do. 
Well 
It is a bit more involved than that.

For a custom warhammer/axe/whatever you will need the following... (using JazzAxe for example)

defs.qc::
•Add a line float IT_JAZZAXE = 128; (assuming ID1, otherwise use next available value)

weapons.qc::
•Add a W_FireJazzAxe function that is a duplicate of W_FireAxe with damage you want instead of 20 and any other special effects you might want
•Above W_Attack add a line "void player_jazzaxe1 ();" without quotes
•Inside W_Attack add an if statement that checks to see if (self.weapon == IT_JAZZAXE) that then goes to player_jazzaxe1 ();

player.qc::
•Copy and paste all 4 functions of player_axe1, player_axe2, player_axe3, player_axe4
•Add "jazz" (without quotes ofc) in front of axe1, axe2, axe3, and axe4 in the function names
•Change W_FireAxe inside player_jazzaxe3 function to be W_FireJazzAxe();

item.qc::
•Copy weapon_nailgun function (or any other weapon), paste, and rename to weapon_jazzaxe
•Change inside weapon_jazzaxe self.weapon to be IT_JAZZAXE, self.netname = "ijazz2's bane";
•Inside weapons_touch add an if (self.classname == "weapon_jazzaxe") new =IT_JAZZAXE;

I probably missed something. 
QMaster 
You forgot W_SetCurrentAmmo?

Anyway,thanks for helping.You probably should changed your username to QCMaster. 
An Unnecessary WIP 
 
you shouldnt need to do any ammo checks with melee weapons, unless you're building a melee weapon that uses ammo, which would be pretty cool too. 
Sorry For Multi-post 
QMaster,I have a problem.
I'm using the AD Shadaxe model for jazzaxe.
FTEQCCGUI compiled without error,but when I try to select the weapon (after picking up) it just switches to the shotgun.The model appears for a split-second then the shotgun appears.I cant use it.

Then I tried (using an InsideQC tut) to make the weapon switchable by selecting axe twice.
Problem is still there.

Help? 
Hrm... 
I've ran into that before...might be a conflict with whichever bitflag value you used for IT_JAZZAXE. Can you upload a zip of your qc files? I might be able to take a look at it. 
QMaster 
http://www.quaketastic.com/files/QC%20Mistakes/ijazz3_qc_jazzaxe_screwed.zip

This one has a few changes from standard id1,including the code which seems to be wrong for the Jazz Axe and some AD-inspired health model changes (.bsp to .mdl) 
Weapons.qc 
W_BestWeapon
Add if at the bottom
if (self.items & IT_JAZZAXE) return IT_JAZZAXE; else return IT_AXE;

And just below that in W_CheckNoAmmo:
inside the if (self.weapon == IT_AXE add "|| self.weapon == IT_JAZZAXE") 
W_CheckNoAmmo 
Something is not right.

CheckNoAmmo does not have if (self.weapon == IT_AXE) part! 
 
i'm out of axe ammo! 
? From The Weapons.qc In The Zip You Sent Me... 
float() W_CheckNoAmmo =
{
if (self.currentammo > 0)
return TRUE;

if (self.weapon == IT_AXE)
return TRUE;

self.weapon = W_BestWeapon ();

W_SetCurrentAmmo ();

// drop the weapon down
return FALSE;
};
 
Thanks 
Never mind,found it.FTEQCCGUI has no Atrl+F combo!!! why!!!!! 
Wait,wut? 
QMaster,the problem is still there.
I did some checking but I can't find anything wrong. 
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.