Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
darkfusion

Weapon Rack (ACS + GZDooM)

Recommended Posts

It is kind of simple. What I did is create an array (list) of the size 999 when the game starts. Then I filled the array using the following pattern:

0 - 150 = 8
151 - 300 = 4
301 - 450 = 2
451 - 999 = 1

Then, when I activate the wall I will check the ID of the weapon rack wall. If for isntance it is lower then 50 it is a shotgun rack. Then I will check if the rack contains less then one shotgun.

If so (the value is 0) it will not give a shotgun. Otherwise it will give out a shotgun to the player and lower the value by one.
I also change the wall texture according to the value :D

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×