Jump to content
  • 0

How to start with a another gun?


KomandoTorpil567

Question

5 answers to this question

Recommended Posts

  • 1

Using (G)ZDoom,

 

Via DECORATE or ZSCRIPT you will need to create a new actor/entity for the "player" (as well as of course have your new weapon defined in DECORATE/ZSCRIPT). It is very simple to set up if all you are doing is changing the player's starting inventory, since you can have it automatically inherit all of the other properties of the original player actor. Here's how it would look in DECORATE:

 

 

ACTOR NewPlayerThing : Doomplayer
{
  Player.StartItem "Colt45"		//This must match the internal name of your new gun, so check its DECORATE/ZSCRIPT file.
  Player.Startitem "Fist"		//If this is not included, the player will not be able to use their fist as a weapon.
  Player.StartItem "Clip", 50		//This gives 50 bullets for the pistol. If your new pistol requires a different/new type of ammo, 
}					//once again make sure to check its actual internal name.

 

If you want the player to have the original pistol in addition to your new weapon, you will have to include another line like so:

ACTOR NewPlayerThing : Doomplayer
{
  Player.StartItem "Colt45"		
  Player.StartItem "Pistol"		//Note that whichever weapon is listed first is the one that the player will have equipped on start up,
  Player.StartItem "Fist"		//hence why the Fist is listed below the Colt 45 in the first example.
  Player.StartItem "Clip", 50
}

edit: Almost forgot, there is one more step. With your new player entity created, you must make a (Z)MAPINFO lump with the following code:

Gameinfo
{
	PlayerClasses = "NewPlayerThing" //Must match the internal name of your new player actor
}

By having only one valid player class defined, the game will use your new player actor without any questions asked. (If you want to make something a bit like Hexen with various different player entities/"classes", you would list the others here as well to give the player the ability to choose from them.)

 

Edited by SMG_Man

Share this post


Link to post
  • 0
On 11/6/2022 at 6:24 PM, SMG_Man said:

Using (G)ZDoom,

 

Via DECORATE or ZSCRIPT you will need to create a new actor/entity for the "player" (as well as of course have your new weapon defined in DECORATE/ZSCRIPT). It is very simple to set up if all you are doing is changing the player's starting inventory, since you can have it automatically inherit all of the other properties of the original player actor. Here's how it would look in DECORATE:

 

 


ACTOR NewPlayerThing : Doomplayer
{
  Player.StartItem "Colt45"		//This must match the internal name of your new gun, so check its DECORATE/ZSCRIPT file.
  Player.Startitem "Fist"		//If this is not included, the player will not be able to use their fist as a weapon.
  Player.StartItem "Clip", 50		//This gives 50 bullets for the pistol. If your new pistol requires a different/new type of ammo, 
}					//once again make sure to check its actual internal name.

 

If you want the player to have the original pistol in addition to your new weapon, you will have to include another line like so:


ACTOR NewPlayerThing : Doomplayer
{
  Player.StartItem "Colt45"		
  Player.StartItem "Pistol"		//Note that whichever weapon is listed first is the one that the player will have equipped on start up,
  Player.StartItem "Fist"		//hence why the Fist is listed below the Colt 45 in the first example.
  Player.StartItem "Clip", 50
}

edit: Almost forgot, there is one more step. With your new player entity created, you must make a (Z)MAPINFO lump with the following code:


Gameinfo
{
	PlayerClasses = "NewPlayerThing" //Must match the internal name of your new player actor
}

By having only one valid player class defined, the game will use your new player actor without any questions asked. (If you want to make something a bit like Hexen with various different player entities/"classes", you would list the others here as well to give the player the ability to choose from them.)

 

ı understand but can you have a video a guy making map info and the subject i talking about?

Share this post


Link to post
  • 0

No video, sorry. If you don't have it already, you will need the program SLADE 3 to do this. It allows you to open up .wad files and modify their entries as well as add and remove them as necessary; ZMAPINFO and DECORATE are two such entries you can put in a .wad for GZDoom.

Edited by SMG_Man

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...