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 

Another weapons type question

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


Joined: 31 May 2005
Posts: 48

PostPosted: Mon Sep 12, 2005 9:57 pm    Post subject: Another weapons type question Reply with quote

I've decided that I will add in an SMG in Pokestein. Anyways, I want it so that if you pick up the SMG the first time, you can use it. Ok, that's obvious enough, but here's the tricky part:

If you pick up another SMG, be it from a badguy or just lying around in some room, you will now be able to dual wield (go akimbo, hold two of 'em, etc.) How would I be able to do this?
Back to top
View user's profile Send private message
Dr. Chainsaw
Corporal


Joined: 05 Sep 2005
Posts: 78
Location: Jolly old England

PostPosted: Mon Sep 12, 2005 10:06 pm    Post subject: Reply with quote

Do u mean shot them at the same time or say 'A key shots gun1 and S key shots gun2'. Max had that problem aswell.
_________________
Flymos rush in were chainsaws fear to tread
Wolf3dcastle forum;
http://www.1-2-free-forums.com/mf/wolf3dcastle.html
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
lizardcommando
Soldier


Joined: 31 May 2005
Posts: 48

PostPosted: Mon Sep 12, 2005 10:17 pm    Post subject: Reply with quote

Well, not exactly. I just want it so that if you pick up the gun again, it would give you another SMG rather than keep giving you a single SMG.

Example:

pick up SMG = recieve one (it would be assigned to key 6)
pick up another SMG = recieve second one (it would be assigned to key 7)
Back to top
View user's profile Send private message
Dr. Chainsaw
Corporal


Joined: 05 Sep 2005
Posts: 78
Location: Jolly old England

PostPosted: Mon Sep 12, 2005 10:21 pm    Post subject: Reply with quote

U know when u kill an ss they drop a machine gun then once you have the machine gun the ss drop ammo. Maybe you can just change the ammo 2 a new weapon.
_________________
Flymos rush in were chainsaws fear to tread
Wolf3dcastle forum;
http://www.1-2-free-forums.com/mf/wolf3dcastle.html
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Hair Machine
Newbie


Joined: 21 Feb 2005
Posts: 12
Location: Down a hole

PostPosted: Tue Sep 13, 2005 1:38 pm    Post subject: Reply with quote

First install Joe's 'don't get a lower weapon with a higher one' tutorial that Dr. Chainsaw posted here (if you haven't already). We'll say that the SMG is called "wp_smg" - add it, but you'll have to do a bit of editing to the tutorial. Basically, remember to add the "int smg" line in otherwise it won't work. It should all be fairly self-explanatory from Joe's tutorial...

Then, add another new weapon; called for example "wp_smg2", except do not add the pickup sprites, or any "bo_" pickup code. Make this weapon double the power of the first SMG, as it is the 'double SMG' weapon that you select with the '7' key.

Once you've got all this set up (I'll trust that you know what you're doing ;) ), open WL_AGENT.C. Find the "bo_" pickup definition in this file. In the case of bo_smg it should look something like this:

Code:
case  bo_smg:
     SD_PlaySound(BLAHSND); //whatever it is
     GiveWeapon(wp_smg);
break;


Edit it so it looks like this:

Code:
case bo_smg:
     SD_PlaySound(BLAHSND); //whatever it is
     if (!smg) GiveWeapon(wp_smg);
     else GiveWeapon(wp_smg2);
break;


If you've done the first bit right, the first time an SMG is picked up the player will receive the "bo_smg" weapon; the second time, and on every subsequent occasion, he'll receive the "bo_smg2" weapon, which is two machineguns, thus giving the impression that the player has picked up a second SMG.

Put any errors down here and I'll have a shot at fixing them Smile
[/code]
_________________
Remember... Rajan is a gimp.
Back to top
View user's profile Send private message Visit poster's website
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.