View Full Version: [Tutorial] Multable Weapons with same key

wolfers >>Coding Alliance >>[Tutorial] Multable Weapons with same key


<< Prev | Next >>

Conner94- 04-01-2005
[Tutorial] Multable Weapons with same key
Does anyone what a tutorial on selecting multible weapons with the same key? I can't post in now because I am on a diffrent computer but I'll post it when I get home if you guys want. And if you don't understand what it is about, it is like RTCW and WOV, so if you have 2 machineguns, press the 3 button once and you would select one, press it again and you get the other. Just an example, you could have multible pistols or chainguns, so do you guys want it?

Deathshead- 04-02-2005

Ok, something like this should work (in CheckWeaponChange): if (gamestate.chosenweapon==wp_pistol && bestweapon>=wp_pistol2) { gamestate.chosenweapon=wp_pistol2; InClearKeysDown(); } else if (gamestate.chosenweapon==wp_pistol2) { gamestate.chosenweapon=wp_pistol1; InClearKeysDown(); } I haven't tried this, but it should work. Flamer46 posted a more complicated tutorial, but it is big and memory straining.

Conner94- 04-02-2005

Wow. That is way simpiler than mine, but won't that go crazy if you hold down the button? Thats why mine had some more stuff in it, but I like this. I'll work on mine more, I found a bug that if you get a machinegun you can't switch to the first pistol.

Deathshead- 04-03-2005

If by crazy you mean, 'holding down 2 will make it switch rapidly between the tow weapons', that's why InClearKeysDown (); is there. It stops it.

Forumer™ is Voted #1 Free Forum Hosting provider
Build your own community today with the largest message board hosting company.