| View previous topic :: View next topic |
| Author |
Message |
lizardcommando Soldier

Joined: 31 May 2005 Posts: 48
|
Posted: Mon Sep 12, 2005 9:57 pm Post subject: Another weapons type question |
|
|
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 |
|
 |
Dr. Chainsaw Corporal

Joined: 05 Sep 2005 Posts: 78 Location: Jolly old England
|
Posted: Mon Sep 12, 2005 10:06 pm Post subject: |
|
|
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 |
|
 |
lizardcommando Soldier

Joined: 31 May 2005 Posts: 48
|
Posted: Mon Sep 12, 2005 10:17 pm Post subject: |
|
|
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 |
|
 |
Dr. Chainsaw Corporal

Joined: 05 Sep 2005 Posts: 78 Location: Jolly old England
|
Posted: Mon Sep 12, 2005 10:21 pm Post subject: |
|
|
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 |
|
 |
Hair Machine Newbie

Joined: 21 Feb 2005 Posts: 12 Location: Down a hole
|
Posted: Tue Sep 13, 2005 1:38 pm Post subject: |
|
|
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
[/code] _________________ Remember... Rajan is a gimp. |
|
| Back to top |
|
 |
|