weapon slots

Discuss programming in the QuakeC language.
Post Reply
thorn3001
Posts: 29
Joined: Tue Jun 28, 2011 6:09 am
Location: Bogotá, Col

weapon slots

Post by thorn3001 »

Good morning everyone!

Someone can help me with my project, now almost all modern FPS have a weapons system slot, anything I can do seemed using DP.
The main character can only carry two weapons at a time and change them when there are other weapons and have a melee attack.
Thorn
Nahuel
Posts: 495
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Re: weapon slots

Post by Nahuel »

thorn3001 wrote:Good morning everyone!

Someone can help me with my project, now almost all modern FPS have a weapons system slot, anything I can do seemed using DP.
The main character can only carry two weapons at a time and change them when there are other weapons and have a melee attack.
I do not understand your thread, sorry! my english is very bad, can you send me a mp in our idiom?? I will reply in this post!
hi, I am nahuel, I love quake and qc.
ceriux
Posts: 2230
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Post by ceriux »

he wants to make it to where you can only carry two weapons. he says that he thinks to do it you need darkplaces, he was wanting help to see if there is a way to do it with out darkplaces.
Nahuel
Posts: 495
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Post by Nahuel »

ceriux wrote:he wants to make it to where you can only carry two weapons. he says that he thinks to do it you need darkplaces, he was wanting help to see if there is a way to do it with out darkplaces.
thank you for the explication! :)
I believe that I saw something similar in old mods for vanilla quake... maybe black ops??? I will check that!
hi, I am nahuel, I love quake and qc.
Nahuel
Posts: 495
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Re: weapon slots

Post by Nahuel »

http://www.quakewiki.net/quake-1/mods/action-quake/
in this mod you only can have two weapons, if you want another weapon you need drop the big weapon! enjoy
hi, I am nahuel, I love quake and qc.
thorn3001
Posts: 29
Joined: Tue Jun 28, 2011 6:09 am
Location: Bogotá, Col

Post by thorn3001 »

Thanks Nahuel,

but I really need an explanation of the code in QC
because I want to apply it in my project
Thorn
Jukki
Posts: 214
Joined: Wed Apr 07, 2010 4:59 am

Post by Jukki »

Its actualy prety simple how i didit.

aicay i just had another float (weapon_2) and i stored the weapon id there.

Then i just made switch function that switches the weapon to weapon 2 and weapon 2 with weapon.


for weapon picking up i had 3 if statements. First one was if there is no weapon_2 then make weapon_2 from weapon and made the new weapon to replace current weapon. 2 one was that if the weapon_2 or weapon is same as picking up weapon where i just gived the player the ammo, and 3 one is that if there is weapon_2 that is not same as picking up weapon, then drop weapon and replace it with new one.

It is prety simple and works fine in vanila quake too ;)
Post Reply