Forum

weapon slots

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

weapon slots

Postby thorn3001 » Fri Aug 12, 2011 4:19 pm

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
User avatar
thorn3001
 
Posts: 29
Joined: Tue Jun 28, 2011 6:09 am
Location: Bogotá, Col

Re: weapon slots

Postby Nahuel » Fri Aug 12, 2011 4:29 pm

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.
User avatar
Nahuel
 
Posts: 492
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Postby ceriux » Fri Aug 12, 2011 4:56 pm

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.
User avatar
ceriux
 
Posts: 2223
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Postby Nahuel » Fri Aug 12, 2011 5:06 pm

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.
User avatar
Nahuel
 
Posts: 492
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Re: weapon slots

Postby Nahuel » Fri Aug 12, 2011 5:56 pm

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.
User avatar
Nahuel
 
Posts: 492
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Postby thorn3001 » Fri Aug 12, 2011 6:55 pm

Thanks Nahuel,

but I really need an explanation of the code in QC
because I want to apply it in my project
Thorn
User avatar
thorn3001
 
Posts: 29
Joined: Tue Jun 28, 2011 6:09 am
Location: Bogotá, Col

Postby Jukki » Fri Aug 12, 2011 7:07 pm

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 ;)
Jukki
 
Posts: 214
Joined: Wed Apr 07, 2010 4:59 am


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest