#2450 posted by Legend on 2018/03/04 16:47:29
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!
#2451 posted by Legend on 2018/03/06 23:26:58
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?
#2452 posted by anonymous user on 2018/03/07 15:57:18
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
#2453 posted by Legend on 2018/03/07 23:35:46
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.
#2454 posted by eukara on 2018/03/08 08:43:38
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 ... :)
#2455 posted by anonymous user on 2018/03/08 18:52:09
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!
#2456 posted by Legend on 2018/03/09 23:24:10
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.
#2457 posted by Dutch on 2018/03/26 10:36:27
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
#2458 posted by ijazz3 on 2018/03/30 12:35:27
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
#2460 posted by ijazz3 on 2018/03/30 16:31:54
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
#2462 posted by Qmaster on 2018/03/30 18:48:53
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
#2463 posted by ijazz3 on 2018/03/31 09:11:13
You forgot W_SetCurrentAmmo?
Anyway,thanks for helping.You probably should changed your username to QCMaster.
An Unnecessary WIP
#2464 posted by Ijazz3 on 2018/03/31 09:25:45
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
#2466 posted by ijazz3 on 2018/03/31 10:37:52
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...
#2467 posted by Qmaster on 2018/03/31 15:27:57
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
#2468 posted by ijazz3 on 2018/04/01 09:28:54
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
#2469 posted by Qmaster on 2018/04/01 14:32:46
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
#2470 posted by ijazz3 on 2018/04/03 17:39:41
Something is not right.
CheckNoAmmo does not have if (self.weapon == IT_AXE) part!
#2471 posted by metlslime on 2018/04/03 19:10:39
i'm out of axe ammo!
? From The Weapons.qc In The Zip You Sent Me...
#2472 posted by Qmaster on 2018/04/03 23:43:08
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
#2473 posted by ijazz3 on 2018/04/05 08:57:05
Never mind,found it.FTEQCCGUI has no Atrl+F combo!!! why!!!!!
Wait,wut?
#2474 posted by ijazz3 on 2018/04/05 09:01:47
QMaster,the problem is still there.
I did some checking but I can't find anything wrong.
|