Force Players to have only 2 Weapons

Discuss all aspects related to modding Zandronum here.
Post Reply
User avatar
fr blood
Frequent Poster Miles card holder
Posts: 995
Joined: Wed Mar 06, 2013 4:04 pm
Location: France

Force Players to have only 2 Weapons

#1

Post by fr blood » Mon May 25, 2015 11:03 am

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 !
Last edited by fr blood on Mon May 25, 2015 11:03 am, edited 1 time in total.

User avatar
TehRealSalt
 
Posts: 51
Joined: Mon Jun 23, 2014 9:13 pm

RE: Force Players to have only 2 Weapons

#2

Post by TehRealSalt » Mon May 25, 2015 11:10 am

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.
[quote=Private IRC Dialog]<ExtremeBurrito> eat gas homo[/quote]

User avatar
Zeberpal
Forum Regular
Posts: 477
Joined: Mon Jun 04, 2012 6:55 am

RE: Force Players to have only 2 Weapons

#3

Post by Zeberpal » Mon May 25, 2015 1:01 pm

Or check WhoDunIt. It uses DropWeapon and PickWeapon states to check if Player has fake item "AlreadyGotAweapon"
Image ImageImage

Catastrophe
Retired Staff / Community Team Member
Posts: 2571
Joined: Sat Jun 02, 2012 2:44 am

RE: Force Players to have only 2 Weapons

#4

Post by Catastrophe » Mon May 25, 2015 4:29 pm

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?

User avatar
fr blood
Frequent Poster Miles card holder
Posts: 995
Joined: Wed Mar 06, 2013 4:04 pm
Location: France

RE: Force Players to have only 2 Weapons

#5

Post by fr blood » Mon May 25, 2015 4:40 pm

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.

Catastrophe
Retired Staff / Community Team Member
Posts: 2571
Joined: Sat Jun 02, 2012 2:44 am

RE: Force Players to have only 2 Weapons

#6

Post by Catastrophe » Mon May 25, 2015 6:23 pm

In that case you'd have to do what WDI does as Zeberpal suggested.

User avatar
fr blood
Frequent Poster Miles card holder
Posts: 995
Joined: Wed Mar 06, 2013 4:04 pm
Location: France

RE: Force Players to have only 2 Weapons

#7

Post by fr blood » Sat May 30, 2015 4:46 pm

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.

Post Reply