Page 1 of 1

[Solved]Parentclass Unrecognized?

PostPosted: Tue Apr 06, 2021 7:58 am
by r3v3n93
I'm made an actor which is similar to DoomWeapon, but it doesn't work. Whenever I apply this to my weapons, it spits "'@property@weapon.ammogive' is an unknown actor property" instantly. In general, it may happen when you didn't applied Classes:Weapon Parentclass to your weapon, but it happens to me even I already added it on the actor!

Code: Select allExpand view
ACTOR PDYWeapon : Weapon
{
    Weapon.BobRangeX 0.2
   Weapon.BobRangeY 0.2
   Weapon.BobSpeed 2
}


Code: Select allExpand view
Actor Car4 : PDYWeapon
{
        Weapon.AmmoGive 30
   Weapon.AmmoType1 "Car4Bul"
   Weapon.AmmoType2 "Car4Mag"
   Weapon.AmmoUse1 1
   Weapon.AmmoUse2 1
   Weapon.SlotNumber 1
   Tag "PDY_CAR4"
   Inventory.PickupMessage "You got CAR-4"
   Obituary "%k killed you with CAR-4"
   +NOALERT
   +WEAPON.NOAUTOAIM
   +WEAPON.AMMO_OPTIONAL
   +WEAPON.ALT_AMMO_OPTIONAL
   +WEAPON.PRIMARY_USES_BOTH //Shortened for your eyes


Any solutions?

Re: Parentclass Unrecognized?

PostPosted: Tue Apr 06, 2021 8:10 am
by Jarewill
Seems to work fine for me.
Are the base class and weapon in separate DECORATE files?
If so, make sure the base class is loaded first.
If they are in the same file, make sure the base class is defined before the weapon.

Re: Parentclass Unrecognized?

PostPosted: Tue Apr 06, 2021 8:24 am
by r3v3n93
Jarewill wrote:Seems to work fine for me.
Are the base class and weapon in separate DECORATE files?
If so, make sure the base class is loaded first.
If they are in the same file, make sure the base class is defined before the weapon.


Worked! Thanks.