Page 1 of 1
Force Players to have only 2 Weapons
Posted: Mon May 25, 2015 11:03 am
by fr blood
Hi there, I'm looking for a way to force player to have only 2 weapons, like it is in other popular FPS games, I really don't know how it's possible, so if any of you got an idea, send it here, thanks !
RE: Force Players to have only 2 Weapons
Posted: Mon May 25, 2015 11:10 am
by TehRealSalt
Contra Doom does this in a similar fashion to how Contra III handled its 2-weapon system, so you could try looking at it or asking Beed28 how he did it. Fair warning though, it's the code is fairly large.
RE: Force Players to have only 2 Weapons
Posted: Mon May 25, 2015 1:01 pm
by Zeberpal
Or check WhoDunIt. It uses DropWeapon and PickWeapon states to check if Player has fake item "AlreadyGotAweapon"
RE: Force Players to have only 2 Weapons
Posted: Mon May 25, 2015 4:29 pm
by Catastrophe
Well it depends on what you mean by two weapons. Is it like WDI where the player has to drop his weapon to pick another one up? Or does a weapon automatically get taken away when you pick up a new one?
RE: Force Players to have only 2 Weapons
Posted: Mon May 25, 2015 4:40 pm
by fr blood
Let me explain, we've got the Doom 2 Armory, by 2 weapons I mean that I would like the player being able to carry only 2 of them (like SSG + Chaingun or Plasmagun + Rocket Launcher or Pistol + Chainsaw), and yes he could switch weapon by dropping one of them on the floor.
RE: Force Players to have only 2 Weapons
Posted: Mon May 25, 2015 6:23 pm
by Catastrophe
In that case you'd have to do what WDI does as Zeberpal suggested.
RE: Force Players to have only 2 Weapons
Posted: Sat May 30, 2015 4:46 pm
by fr blood
I checked all mode that used weapons with that way, and of course it would use too much coding for the simple mode I'm doing, I prefer to forgot it, thanks for the help.