Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
I tried to launch Doom with the Rifle mod, then typed "Summon RIFLE" and I can't pick it up. For some reason, I fixed the pickup.
GZDoom crashes when that said:
Script error, "rifle.wad:DECORATE" line 1:
DoomEdNum must be in the range [-1,32767]
Execution could not continue.
1 errors while parsing DECORATE scripts
My DECORATE.TXT file I am going to show you:
actor Rifle : Weapon 63250
{
Weapon.SlotNumber 4
Weapon.AmmoType "Clip"
Weapon.AmmoUse 1
Weapon.BobStyle Smooth
Weapon.BobSpeed 5.0
Weapon.BobRangeX 0.4
Weapon.BobRangeY 0.2
AttackSound "weapons/riflefire"
SeeSound "weapons/rifleready"
Tag "Rifle"
States
{
Ready:
ASSG A 1 A_WeaponReady
loop
Select:
DRAW A 1 A_Raise
DRAW B 1
DRAW C 1
DRAW D 1
ASSG A 1
loop
Deselect:
ASSG A 1
DRAW D 1
DRAW C 1
DRAW B 1
DRAW A 1 A_Lower
loop
Fire:
ASSF A 2 BRIGHT A_PlaySound("weapons/riflefire",2)
ASSF B 1 BRIGHT A_FireBullets(0,0,1,4)
ASSF A 3 A_ReFire
Goto Ready
Spawn:
RIFL A -1
Stop
}
}
I did the code right to the video, but for some reason now, it just keeps crashing instead of fixing it. Could you help me? There is no way to put DoomEdNum and then the DoomEdNum said that it is unknown.
Whoa, Script error, "rifle.wad:DECORATE" line 3:
Unexpected '4' in definition of 'Rifle'
I am going to delete Weapon.SlotNumber because it was going to be replaced as a pistol.
In order to function as a weapon, an actor needs to inherit from [wiki=Classes:Weapon]Weapon[/wiki]. That's what your code was missing.
I am going to delete Weapon.SlotNumber because it was going to be replaced as a pistol.
If you do that, you won't be able to select the weapon in the game. Replacing is not [wiki=Using_inheritance]inheritance[/wiki]. Instead of removing the property, change it to 2.
Maybe now is the time to share your file. We just cannot help you without directly looking at that file. And telling us that "it don't work" is not helpful either.