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

Require help with DECORATE

Recommended Posts

I Need major help with scripting a weapon in Decorate. I'm having major problems with parsing errors and classes to inherent from.

Here's the code for the weapons:

actor Rifle : Weapons 96439

//$Category Weapons
   Weapon.AmmoUse 1
   Weapon.AmmoGive 20
   Weapon.AmmoType "Clip"
   Inventory.PickupMessage "You got the rifle!"
   Obituary "%k riddled %o with bullets."
   attacksound "dspistol"
   Decal "BulletChip"
   Weapon.SlotNumber 4
     RIF4 A 1 A_WeaponReady
     RIF4 A 1 A_Lower
     RIF4 A 1 A_Raise
     RIF2 B 1 bright A_FireBullets (3, 2, 1, 7)
     RIF3 B 0 bright A_GunFlash
     RIF2 B 0 bright A_Quake (1, 2, 0, 1)
     RIF3 B 0 bright A_SetPitch (pitch-0.1)
     RIF2 CD 1 A_SetPitch (pitch-0.075)
     RIF3 C 1
     RIF2 A 1 A_Refire
     goto Ready
     TNT1 A 3 Bright A_Light1
     Goto LightDone
     RIF1 A -1
I based the code off of another gun I got from Realm 667:


Here's what happens when I go into Doom builder:

The weapon I'm inheriting from is supposed to be weapon, but I slightly messed up. Either way, it never works. Not even if I inherit from a Doom weapon (Chaingun).

Share this post

Link to post

actor Rifle : Weapons 96439
Weapon, not Weapons. Update the code, save the wad and tell us what new error message do you get.
There should be a number after Weapon.SelectionOrder, for example:

Weapon.SelectionOrder 987

Share this post

Link to post

Unable to find the DECORATE class 'Weapon' to inherit from, while parsing 'Rifle:96439'

Oh, and I'm using Gzdoom builder by the way.

EDIT: Also got this as well when testing the map with gzdoom:

Script error, "Doom - The Viruswad (2).wad:DECORATE" line 7:
SC_GetNumber: Bad numeric constant "Weapon".

If you want to check the wad for anything, here's the link (Requires Gzdoom!)


Share this post

Link to post

Oops. Heheh, I uploaded that before I read the "Number can't be below 96439" part. But yeah, I already followed those steps (it seems that it STILL doesn't work).

Share this post

Link to post
Broken Pencil said:

I already followed those steps (it seems that it STILL doesn't work).

I did the same changes myself in the wad you've posted, and I've been able to run it in ZDoom without any errors or warnings.

EDIT: GZDoom worked too. I've also opened the wad's MAP01 in GZDoomBuilder and launched it from there, no problems.

Share this post

Link to post

I've found the problem. The wad lacks the rifle sprites. First, they should be placed between SS_START and SS_END markers inside the wad. Second, they must be named RIF1A0 etc., the A0 (B0, C0...) suffix is critical. That's why ZDoom refuses to load the weapon.

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