Summon custom weapons

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Summon custom weapons

Postby superscrungus » Thu Nov 15, 2018 8:08 pm

Hiya, little problem with a custom weapon. Doesn't cause any errors, but it won't spawn in when using the "summon" command, and won't appear with the "give" command. Of note is that it's not part of the existing Doom 2 arsenal, and is a test weapon intended to share the 6th slot with the Plasma Rifle. Just an Unmaker that fires Super Shotgun blasts. Not a problem in and of itself, but if this issue persists to non-test weapons this will quickly get irritating.

Here's the code (no doubt amateurish and probably full of messy mistakes i missed).

Code: Select allExpand view
// --------------------------------------------------------------------------
//
// Unmaker
//
// --------------------------------------------------------------------------

actor Unmaker : Weapon 0666
{
   AttackSound "weapons/unmaker"
   Weapon.SelectionOrder 450
   Weapon.SlotNumber 6
   Weapon.SlotPriority 1
   Weapon.AmmoUse 40
   Weapon.AmmoGive 40
   Weapon.AmmoType "Cell"
   Inventory.PickupMessage "$GOTUNMAKER"
   Obituary "$OB_UNMAKERMP"
   Tag "$TAG_UNMAKER"
   States
   {
   Ready:
      UNMA A 1 A_WeaponReady
      Loop
   Deselect:
      UNMA A 1 A_Lower
      Loop
   Select:
      UNMA A 1 A_Raise
      Loop
   Fire:
      UNMA A 0 A_GunFlash
      UNMA A 4 A_FireShotgun2   
      UNMA A 0 A_ReFire
      Goto Ready
   Flash:
      UNMA B 2
      Goto LightDone
   Spawn:
      LGUN A -1
      Stop
   }
}
User avatar
superscrungus
 
Joined: 27 Sep 2018
Discord: superscrungus#4557

Re: Summon custom weapons

Postby wildweasel » Fri Nov 16, 2018 1:51 am

Is the sprite UNMAA0 present in your file?
User avatar
wildweasel
「お前はもうトースト」[you are already toast.]
Moderator Team Lead
 
Joined: 15 Jul 2003

Re: Summon custom weapons

Postby Tartlman » Fri Nov 16, 2018 11:12 am

Are you sure you placed markers in your wad?
You need to place a marker called S_START at the beginning of your sprite list and one called S_END at the ending. Marker should be the default data type when you make a new entry in SLADE3. Here's what it should look like:

DECORATE.txt
S_START
your sprites go here
S_END

If you don't do this, then doom will not know what the sprites it has to load are.
I hope this helps.
User avatar
Tartlman
 
Joined: 11 Oct 2018
Discord: Tartlman#2947

Re: Summon custom weapons

Postby TheMightyHeracross » Fri Nov 16, 2018 11:53 am

Alternatively, if you are using a .pk3 file, sprites should be in the "Sprites" folder.
User avatar
TheMightyHeracross
Close Combat!
 
Joined: 18 Aug 2013
Location: Philadelphia, PA
Discord: TheMightyHeracross#1716

Re: Summon custom weapons

Postby superscrungus » Fri Nov 16, 2018 12:16 pm

Tartlman wrote:Are you sure you placed markers in your wad?
You need to place a marker called S_START at the beginning of your sprite list and one called S_END at the ending. Marker should be the default data type when you make a new entry in SLADE3. Here's what it should look like:

DECORATE.txt
S_START
your sprites go here
S_END

If you don't do this, then doom will not know what the sprites it has to load are.
I hope this helps.


That was exactly what I needed! Thought it would've been a much bigger mess to fix lol. Thanks a bunch!
User avatar
superscrungus
 
Joined: 27 Sep 2018
Discord: superscrungus#4557


Return to Scripting

Who is online

Users browsing this forum: No registered users and 1 guest