A Christmas present for ZDoom
Moderator: GZDoom Developers
- TheDarkArchon
- Posts: 7656
- Joined: Sat Aug 07, 2004 5:14 am
- Location: Some cold place
- Graf Zahl
- Lead GZDoom+Raze Developer

- Posts: 49252
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
No. Decorations.cpp jumps into thingdef.cpp when it encounters an ACTOR definition. All new code for the parser is inside thingdef.cpp.
And here's an example weapon (the one I tested it with so it's quite crappy):
And here's an example weapon (the one I tested it with so it's quite crappy):
Code: Select all
ACTOR IceBall : PlasmaBall
{
DamageType Ice
}
ACTOR ChaingunTest : Weapon 2002
{
+AMMO_OPTIONAL
Weapon.SelectionOrder 700
Inventory.PickupSound "misc/w_pkup"
Inventory.PickupMessage "You got the chaingun test!"
Weapon.AmmoType "ClipTest"
Weapon.AmmoGive 20
Weapon.AmmoUse 1
Weapon.Kickback 400
Weapon.YAdjust 40
AttackSound "weapons/chngun"
Weapon.SisterWeapon ChaingunTestPowered
States
{
Spawn:
MGUN A -1
Loop
Ready:
CHGG A 1 A_WeaponReady
Loop
Deselect:
CHGG A 1 A_Lower
Loop
Select:
CHGG A 1 A_Raise
Loop
Fire:
CHGG A 0 A_JumpIfNoAmmo(8)
CHGG A 0 A_JumpIfInventory("RedCard",1,4)
CHGG A 0 A_GunFlash
CHGG A 4 A_FireCustomMissile("IceBall")
CHGG B 0 A_ReFire
goto Ready
CHGG A 0 A_GunFlash
CHGG A 4 A_FireCustomMissile("Rocket")
CHGG B 0 A_ReFire
Goto Ready
CHGG A 10 A_CustomPunch(5000, 1, 0, "Blood")
Goto Ready
Flash:
CHGG A 0 A_JumpIfInventory("RedCard",1,3)
CHGF A 5 BRIGHT A_Light1
CHGF A 0 BRIGHT A_Light0
Stop
CHGF A 5 BRIGHT A_LightInverse
CHGF A 0 BRIGHT A_Light0
Stop
}
}
ACTOR ChaingunTestPowered : ChaingunTest
{
+POWERED_UP
Weapon.AmmoGive 0
Weapon.SisterWeapon ChaingunTest
States
{
Fire:
CHGG A 0 A_GunFlash
CHGG A 0 A_FireCustomMissile("IceBall", -20, 0, -10, 10)
CHGG A 0 A_FireCustomMissile("IceBall", -10, 1, -5, 5)
CHGG A 0 A_FireCustomMissile("IceBall", 0, 0)
CHGG A 0 A_FireCustomMissile("IceBall", 10, 1, 5, 5)
CHGG A 4 A_FireCustomMissile("IceBall", 20, 0, 10, 10)
CHGG B 0 A_ReFire
Goto Ready
}
}
- Cutmanmike
- Posts: 11355
- Joined: Mon Oct 06, 2003 3:41 pm
- Operating System Version (Optional): Windows 10
- Location: United Kingdom
- Contact: