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

Script Error @property@actor unknown actor property!

Recommended Posts

Posted (edited)

This keeps happening to me and I don't know how to fix it! PLEASE HELP ME!!!

 

The Code:

ACTOR REDNECKKILLINGMACHINE : DoomPlayer
{
    Player.StartItem "Glock2065"
    Player.StartItem "Fist"
    Player.StartItem "Clip", 50
    Player.WeaponSlot 2, Glock2065
    Player.WeaponSlot 1, Fists
}

 

ACTOR Glock2065 : Weapon Replaces Pistol
{
   Weapon.SelectionOrder 700
   Weapon.AmmoUse 1
   Weapon.AmmoGive 20
   Weapon.AmmoType "Clip"
   Inventory.PickupMessage "You got the Pistol!"
   Obituary "%k fucked by %o Pistol."
   attacksound "Pistol/Fire"
   Decal "BulletChip"
   Weapon.SlotNumber 2
   +WEAPON.NOAUTOFIRE
   States
   {
   Ready:
     D2RG A 1 A_WeaponReady
     Loop
   Deselect:
     D2RG A 1 A_Lower
     Loop
   Select:
     D2RG A 1 A_Raise
     Loop
   Fire:
     D2RF A 0 bright A_FireBullets (2, 2, -1, 9, "HitPuff")
     D2RF B 1
     D2RF C 2
     D2RF D 3
     D2RF E 4
     goto Ready
   Flash:
     TNT1 A 3 Bright A_Light1
     Goto LightDone
   Spawn:
     DEGT A -1
     Stop
   }
}
 

Edited by ZELASTKILL

Share this post


Link to post
Posted (edited)

Mind describing the error with a little more detail such as a log or a screenshot? I'm struggling to see the issue so far.

 

EDIT: Also unless "Doomplayer" is an acceptable form of custom player stats, try using "playerpawn".

Share this post


Link to post

The log will show exactly what line and what property is erroring out.

Share this post


Link to post

If I'm remembering correctly, I don't think you can use the "replaces" function to replace a weapon.

 

I think just having the "Player.WeaponSlot 2, Glock2065" like you have is all you need.

 

You'll also need a KEYCONF lump in your WAD for your custom player class to work, if you don't have one already.

 

The KEYCONF lump should only need:

clearplayerclasses
addplayerclass "REDNECKKILLINGMACHINE"

 

 

Share this post


Link to post
13 hours ago, RonnieJamesDiner said:

If I'm remembering correctly, I don't think you can use the "replaces" function to replace a weapon.

 

You can, actually.

 

13 hours ago, RonnieJamesDiner said:

You'll also need a KEYCONF lump in your WAD for your custom player class to work, if you don't have one already.

 

The KEYCONF lump should only need:

clearplayerclasses
addplayerclass "REDNECKKILLINGMACHINE"

 

That method is deprecated. Player classes are defined in MAPINFO instead now - see this page at the ZDoom wiki.

Share this post


Link to post
4 hours ago, MFG38 said:

That method is deprecated. Player classes are defined in MAPINFO instead now - see this page at the ZDoom wiki.

 

Whoops! I didn't realize this, thank you!

 

As far as using the Replaces function with weapons, I must be doing something wrong because I've never been able to get this to work. I always get an error message saying "Expected '{' but got identifier 'Replaces' instead." Weapons are the only actor types that give me this error when trying to use that function.

Share this post


Link to post
1 hour ago, RonnieJamesDiner said:

As far as using the Replaces function with weapons, I must be doing something wrong because I've never been able to get this to work. I always get an error message saying "Expected '{' but got identifier 'Replaces' instead." Weapons are the only actor types that give me this error when trying to use that function.

 

Out of curiosity, which source port and version of it do you use? The only explanation I can think of is that you're using either an ancient version of ZDoom or a derivative port where the functionality hasn't been implemented.

Share this post


Link to post

Well, that's odd...

 

Sadly, though, I can't help. @Graf Zahl if anyone is likely to know what's going on.

Share this post


Link to post

This has been bugging the hell out of me, and after pulling my hair out trying to understand, I almost had a brain hemorrhage when I realized what I was doing wrong. I had never been adding the word Weapon. Every time I've tried to do it, I was writing ACTOR Glock2065 : Replaces Pistol, rather than Weapon replaces Pistol

 

Paris_Tuileries_Garden_Facepalm_statue2.jpg.c503431de45af8908b95abaa3ddfda71.jpg

 

 

Thank you for inciting me to figure this out, though. The learning never ends.

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
×