Author |
Message |
Joshua
DieHard SS

Joined: 15 Mar 2012
Last Visit: 18 Feb 2019
Topics: 204
Posts: 477

|
Posted: Tue Sep 25, 2018 6:28 am
Subject: How do you display two of the same weapons in SDL Games?
[ IP : Logged ]
|

 
|
|
Does anyone on here know how to display two of the same weapon in a Wolfenstein 3D video game mod without having to add sprites? I remember something being said about using draw. Is the weapon number for example, 4 is the chain gun indication of how powerful the weapon is? I remember the four weapons being coded in SDL in a way that each weapon was powerful in strength. This also depended on additional code. How do I implement two weapons in SDL easily without having to add additional sprites? |
|
|
 |
AlumiuN
DieHard Wolfer

Joined: 29 Nov 2007
Last Visit: 0:33 ago.
Topics: 38
Posts: 2538
Location: Christchurch, New Zealand

|
Posted: Tue Sep 25, 2018 4:50 pm
Subject: Re: How do you display two of the same weapons in SDL Games?
[ IP : Logged ]
|

  
|
|
The call to SimpleScaleShape in DrawPlayerWeapon is what draws the player's weapon; you can duplicate the call and change the xcenter (which is the first argument) of both calls to an appropriate number so that they're offset. Note that both weapons will display the same frame when firing with this method, but there's not really a good way around it without adding more sprites. |
|
|
 |
Tricob
Moderator


Joined: 14 Mar 2005
Last Visit: 14:30 ago.
Topics: 165
Posts: 8330
Location: Neo-traditions, Inc.

|
Posted: Tue Sep 25, 2018 8:01 pm
Subject: Re: How do you display two of the same weapons in SDL Games?
[ IP : Logged ]
|

 
|
|
As for strength, you'll need to go to the GunAttack routine in WL_AGENT.CPP. |
|
|
 |
|