I've been trying to add some kickback to a kick attack, and the mod is written I DECORATE, but when trying to add some actor flags, GZDoom wouldn't load it; I feel like I'm going crazy because sometime GZDoom just, freaks out, it seems like. Sometimes there's something in my autoload, but in this case it still happens. Is this to be expected? or am I just not grasping how to use weapon flags...
edit: also will mention I *think* it has some ACS. Maybe that's dependent on the decorate being in a certain state?
Are there features of DECORATE that no longer work at all in modern GZDoom?
Moderator: GZDoom Developers
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.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
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.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
-
- Posts: 38
- Joined: Mon Nov 18, 2024 3:08 pm
-
-
- Posts: 26689
- Joined: Tue Jul 15, 2003 4:58 pm
- Location: Scotland
Re: Are there features of DECORATE that no longer work at all in modern GZDoom?
Hard to tell what's wrong without seeing your code.
However, it should still work. It sounds like you are trying to copy from an existing mod. Does that work?
However, it should still work. It sounds like you are trying to copy from an existing mod. Does that work?
-
- Posts: 38
- Joined: Mon Nov 18, 2024 3:08 pm
Re: Are there features of DECORATE that no longer work at all in modern GZDoom?
Yeah, you're right, here is the mod I want modify, adding kickback to a kick attack, as it were.
Unfortunately I don't have the exact code that was throwing the error, I got frustrated and trashed it..
I did try "WEAPON.STAFF2_KICKBACK" but that didn't seem to work, so Iooked a little deeper and found some other way to add it (In theory) but I can't remember what it was I was trying to copy in. I was actually just copying it from the wiki, and yes, the original mod does work fine..
Maybe you know what the other option for adding kickback is? It was through weapon properties - "ApplyKickback"
All I did was try putting "WeaponKickback 8" or whatever underneath the "+UNDROPPABLE" and "+UNTOSSABLE" flags. I get not a valid property. In the case of the Staff Kickback one, it didn't recognize the flag.. I tried both with a plus and without a plus in front of it, in case it made a difference.
Code: Select all
Actor KickItem : CustomInventory
{
+UNDROPPABLE
+UNTOSSABLE
States
{
Use:
TNT1 A 0 A_Overlay(-999, "Kick", true) //GZDoom only, I wish Zandronum added support for A_Overlay
TNT1 A 0 A_OverlayOffset(-999, 0, 32) //So the offsets won't be messed up
Fail //So you can use this item multiple times!
Kick:
TNT1 A 0 A_OverlayFlags(-999,PSPF_PLAYERTRANSLATED,true)
TNT1 A 0 A_PlaySoundEx("KICK",CHAN_7)
TNT1 A 0 A_JumpIfInventory("PowerStrength",1,"KickBerserk")
TNT1 A 0 A_JumpIf(momZ > 0, "AirKick")
TNT1 A 0 A_JumpIf(momZ < 0, "AirKick")
TNT1 A 0 A_SetSpeed(0.25)
KICK ABC 1
KICK D 3 A_FireCustomMissile("Kick_It",0,0) //[bool useammo] has to be 0 to prevent this item from chewing ammo of the gun you're holding
KICK ECBA 2
TNT1 A 0 A_SetSpeed(1.0)
TNT1 A 1
Stop
KickBerserk:
TNT1 A 0 A_JumpIf(momZ > 0, "AirKickBerserk")
TNT1 A 0 A_JumpIf(momZ < 0, "AirKickBerserk")
TNT1 A 0 A_SetSpeed(0.25)
KICK ABC 1
KICK D 3 A_FireCustomMissile("Kick_It2",0,0)
KICK ECBA 2
TNT1 A 0 A_SetSpeed(1.0)
TNT1 A 1
Stop
AirKick:
TNT1 A 0 A_Recoil(-5)
AKIK ABC 1
AKIK D 3 A_FireCustomMissile("AirKick_It",0,0)
AKIK ECBA 2
TNT1 A 1
Stop
AirKickBerserk:
TNT1 A 0 A_Recoil(-5)
AKIK ABC 1
AKIK D 3 A_FireCustomMissile("AirKick_It2",0,0)
AKIK ECBA 2
TNT1 A 1
Stop
}
}
//this has to be a "FastProjectile" to prevent the actor from creating selected weapon's decals
Actor Kick_It : FastProjectile
{
Radius 20
Height 6
DamageType Kick
Projectile
+FORCEXYBILLBOARD
+noextremedeath
RenderStyle Translucent
Alpha 0.75
Scale 1.00
Damage 25
Speed 30
decal "none"
SeeSound "none"
DeathSound "none"
States
{
Spawn:
TNT1 A 0
STOP
Death:
TNT1 A 0
TNT1 A 0 A_PlaySound("KickHit",CHAN_BODY)
PUFF CDE 3
Stop
}
}
//this needed for berserked mode!
Actor Kick_It2 : Kick_It
{
-noextremedeath
damage 200
}
Actor AirKick_It : Kick_It
{
Damage 50
}
Actor AirKick_It2 : Kick_It
{
-NoExtremeDeath
Damage 500
}
I did try "WEAPON.STAFF2_KICKBACK" but that didn't seem to work, so Iooked a little deeper and found some other way to add it (In theory) but I can't remember what it was I was trying to copy in. I was actually just copying it from the wiki, and yes, the original mod does work fine..
Maybe you know what the other option for adding kickback is? It was through weapon properties - "ApplyKickback"
All I did was try putting "WeaponKickback 8" or whatever underneath the "+UNDROPPABLE" and "+UNTOSSABLE" flags. I get not a valid property. In the case of the Staff Kickback one, it didn't recognize the flag.. I tried both with a plus and without a plus in front of it, in case it made a difference.
-
-
- Posts: 26689
- Joined: Tue Jul 15, 2003 4:58 pm
- Location: Scotland
Re: Are there features of DECORATE that no longer work at all in modern GZDoom?
I think what you are talking about is Weapon.KickBack, not WeaponKickBack
I don't know if it's what you are looking for though:
"How far attacks by this weapon push the enemy back. Damage is also a factor in kickback." (from https://zdoom.org/wiki/Weapon_properties )
So, it pushes enemies hit by the weapon back. Is that what you wanted?
I don't know if it's what you are looking for though:
"How far attacks by this weapon push the enemy back. Damage is also a factor in kickback." (from https://zdoom.org/wiki/Weapon_properties )
So, it pushes enemies hit by the weapon back. Is that what you wanted?