Wolf Planet Forum Index Wolf Planet
We want you here!
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[Tutorial] Multable Weapons with same key

 
Post new topic   Reply to topic    Wolf Planet Forum Index -> Coding Alliance
View previous topic :: View next topic  
Author Message
Conner94
Moderator


Joined: 15 Jan 2005
Posts: 249
Location: ???

PostPosted: Fri Apr 01, 2005 9:47 pm    Post subject: [Tutorial] Multable Weapons with same key Reply with quote

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?
_________________
My Wolfenstein Website:
http://www.wolf94.cjb.net

Status: Falling apart over a product I ordered that is taking forever to arrive.
Back to top
View user's profile Send private message Visit poster's website
Deathshead
Corporal


Joined: 18 Feb 2005
Posts: 87

PostPosted: Sat Apr 02, 2005 8:32 am    Post subject: Reply with quote

Ok, something like this should work (in CheckWeaponChange):

Code:

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.
_________________
Myspace
VampireFreaks
Music4Life
Wolfing Time
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Conner94
Moderator


Joined: 15 Jan 2005
Posts: 249
Location: ???

PostPosted: Sun Apr 03, 2005 1:55 am    Post subject: Reply with quote

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.
_________________
My Wolfenstein Website:
http://www.wolf94.cjb.net

Status: Falling apart over a product I ordered that is taking forever to arrive.
Back to top
View user's profile Send private message Visit poster's website
Deathshead
Corporal


Joined: 18 Feb 2005
Posts: 87

PostPosted: Sun Apr 03, 2005 9:02 am    Post subject: Reply with quote

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.
_________________
Myspace
VampireFreaks
Music4Life
Wolfing Time
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Wolf Planet Forum Index -> Coding Alliance All times are GMT
Page 1 of 1

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001 phpBB Group

Chronicles phpBB2 theme by Jakob Persson (http://www.eddingschronicles.com). Stone textures by Patty Herford.