[SOLVED] why me

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

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!)
Post Reply
User avatar
DELTAtheDboi005
Posts: 218
Joined: Tue Apr 05, 2022 3:43 am
Preferred Pronouns: He/Him

[SOLVED] why me

Post by DELTAtheDboi005 »

So I'm trying to make a custom pistol, But i just cant get it to work correctly.

Actor TAODPistol: Weapon 15001

{
Game Doom
Weapon.Ammogive 12
Weapon.AmmoUse 1
Weapon.SelectionOrder 10
Weapon.KickBack 10
Weapon.AmmoType "Clip"
Obituary "o% was shot by k%"
states
{
Spawn:
ULGN A -1
Stop
Ready:
TPIL A 2 A_WeaponReady
Loop
Select:
TPIL A 2 A_Raise
Loop
Deselect:
TPIL A 2 A_Lower
Loop
Fire:
TPIL B 2 A_PlaySound ("PISTOL1")
TPIL C 2 A_FireBullets (2, 2, 1, 20, "PistolPuff")
TPIL D 2 Bright
TPIL E 2 Bright
TPIL F 2 Bright
TPIL G 2 Bright
TPIL H 2 A_ReFire
Goto Ready
}
}

Actor PistolPuff

{
Radius 32
Height 32
Damage 20
+NOGRAVITY
+ACTIVATEIMPACT
+PUFFONACTORS
States
{
Spawn:
TNT1 A 1
Stop
}
}


But if i do this:

Actor TAODPistol: Weapon replaces Pistol

{
Game Doom
Weapon.Ammogive 12
Weapon.AmmoUse 1
Weapon.SelectionOrder 10
Weapon.KickBack 10
Weapon.AmmoType "Clip"
Obituary "o% was shot by k%"
states
{
Spawn:
ULGN A -1
Stop
Ready:
TPIL A 2 A_WeaponReady
Loop
Select:
TPIL A 2 A_Raise
Loop
Deselect:
TPIL A 2 A_Lower
Loop
Fire:
TPIL B 2 A_PlaySound ("PISTOL1")
TPIL C 2 A_FireBullets (2, 2, 1, 20, "PistolPuff")
TPIL D 2 Bright
TPIL E 2 Bright
TPIL F 2 Bright
TPIL G 2 Bright
TPIL H 2 A_ReFire
Goto Ready
}
}

Actor PistolPuff

{
Radius 32
Height 32
Damage 20
+NOGRAVITY
+ACTIVATEIMPACT
+PUFFONACTORS
States
{
Spawn:
TNT1 A 1
Stop
}
}

It causes EVEN MORE issues.



These issues include but not limited to:

Weapon not appearing on the map
Gzdoom not starting due to things like: weapon.ammouse or other properties being unknown, A_weaponready and other functions being unknown etc.
DECORATE warning in "PISTOL.wad\DECORATE:0", line 35. Unable to find "Weapon" class to inherit from, while parsing "TAODPistol:15001".
gzdoom not being able to find a specific sprite lump
Conflicts between the weapon and the pistol
and a bunch of other things.

I'm just about on the verge of giving up, Can someone help me please?. :|
Last edited by DELTAtheDboi005 on Mon Apr 11, 2022 7:48 pm, edited 2 times in total.
User avatar
ramon.dexter
Posts: 1529
Joined: Tue Oct 20, 2015 12:50 pm
Graphics Processor: nVidia with Vulkan support
Location: Kozolupy, Bohemia

Re: why me

Post by ramon.dexter »

Are you loading gzdoom.pk3 as a resource (excluded for testing of course)?
Gez
 
 
Posts: 17835
Joined: Fri Jul 06, 2007 3:22 pm

Re: why me

Post by Gez »

DELTAtheDboi005 wrote:Gzdoom not starting due to things like: weapon.ammouse or other properties being unknown, A_weaponready and other functions being unknown etc.
DECORATE warning in "PISTOL.wad\DECORATE:0", line 35. Unable to find "Weapon" class to inherit from, while parsing "TAODPistol:15001".
You have these errors in GZDoom? Just making sure.
User avatar
DELTAtheDboi005
Posts: 218
Joined: Tue Apr 05, 2022 3:43 am
Preferred Pronouns: He/Him

Re: [SOLVED] why me

Post by DELTAtheDboi005 »

Yeah i did have those errors as i was testing the weapon, I really don't know to be honest.
Last edited by DELTAtheDboi005 on Mon Apr 11, 2022 7:54 pm, edited 3 times in total.
User avatar
DELTAtheDboi005
Posts: 218
Joined: Tue Apr 05, 2022 3:43 am
Preferred Pronouns: He/Him

Re: [SOLVED] why me

Post by DELTAtheDboi005 »

ramon.dexter wrote:Are you loading gzdoom.pk3 as a resource (excluded for testing of course)?

No, Or at least I really hope not, Maybe gzdoom just doesn't sit right with the weapon I'm working on and at this point, I'm just at a loss.

When I fixed the errors, The weapon just wouldn't appear at all and when I try to use the console to summon it, It won't give it to me, Am I doing something wrong? or is
there another force at play?.

I really don't know.
Last edited by DELTAtheDboi005 on Mon Apr 11, 2022 7:51 pm, edited 3 times in total.
User avatar
DELTAtheDboi005
Posts: 218
Joined: Tue Apr 05, 2022 3:43 am
Preferred Pronouns: He/Him

Re: [SOLVED] why me

Post by DELTAtheDboi005 »

Here's the weapon.
Last edited by DELTAtheDboi005 on Mon Apr 11, 2022 7:51 pm, edited 1 time in total.
User avatar
DELTAtheDboi005
Posts: 218
Joined: Tue Apr 05, 2022 3:43 am
Preferred Pronouns: He/Him

Re: [SOLVED] why me

Post by DELTAtheDboi005 »

I DESPERATELY need help, as this is just pure agony. :x
Last edited by DELTAtheDboi005 on Mon Apr 11, 2022 7:50 pm, edited 1 time in total.
User avatar
DELTAtheDboi005
Posts: 218
Joined: Tue Apr 05, 2022 3:43 am
Preferred Pronouns: He/Him

Re: [SOLVED] why me

Post by DELTAtheDboi005 »

Here's another version.
Last edited by DELTAtheDboi005 on Mon Apr 11, 2022 7:50 pm, edited 1 time in total.
User avatar
DELTAtheDboi005
Posts: 218
Joined: Tue Apr 05, 2022 3:43 am
Preferred Pronouns: He/Him

Re: [SOLVED] why me

Post by DELTAtheDboi005 »

Okay, I think I fixed it.
Last edited by DELTAtheDboi005 on Mon Apr 11, 2022 7:49 pm, edited 1 time in total.
User avatar
DELTAtheDboi005
Posts: 218
Joined: Tue Apr 05, 2022 3:43 am
Preferred Pronouns: He/Him

Re: [SOLVED] why me

Post by DELTAtheDboi005 »

I DEFINITELY fixed it, I even slapped an alt fire on to it.
User avatar
DELTAtheDboi005
Posts: 218
Joined: Tue Apr 05, 2022 3:43 am
Preferred Pronouns: He/Him

Re: [SOLVED] why me

Post by DELTAtheDboi005 »

Here's how I did it.

ACTOR Plinker : DoomWeapon replaces Pistol
{
Weapon.SelectionOrder 1900
Weapon.AmmoUse1 1
Weapon.AmmoUse2 2
Weapon.AmmoGive 20
Weapon.Slotnumber 2
Weapon.AmmoType1 "Clip"
Weapon.AmmoType2 "Clip"
Obituary "$OB_MPPISTOL"
+WEAPON.WIMPY_WEAPON
Inventory.Pickupmessage "$PICKUP_PISTOL_DROPPED"
Tag "$TAG_PISTOL"
States
{
Ready:
TPIS A 1 A_WeaponReady
Loop
Deselect:
TPIS A 1 A_Lower
Loop
Select:
TPIS A 1 A_Raise
Loop
Fire:
TPIS A 1 A_Playsound ("PISTOL1")
TPIS B 1 A_FireBullets (2, 2, 1, 20, "BulletPuff")
TPIS C 1
TPIS DEFGH 1
Goto Ready
AltFire:
TPIS A 1 A_Playsound ("PISTOL1")
TPIS B 1 A_FireBullets (4, 4, 5, 40, "BulletPuff")
TPIS C 1
TPIS DEFGH 1
TPIS A 1 A_Playsound ("PISTOL1")
TPIS B 1 A_FireBullets (4, 4, 5, 40, "BulletPuff")
TPIS C 1
TPIS DEFGH 1
TPIS A 1 A_Playsound ("PISTOL1")
TPIS B 1 A_FireBullets (4, 4, 5, 40, "BulletPuff")
TPIS C 1
TPIS DEFGH 1
TPIS A 1 A_Playsound ("PISTOL1")
TPIS B 1 A_FireBullets (4, 4, 5, 40, "BulletPuff")
TPIS C 1
TPIS DEFGH 1
Goto Ready
Spawn:
PIST A -1
Stop
}
}
User avatar
MFG38
Posts: 414
Joined: Sun Apr 14, 2019 8:26 am
Graphics Processor: nVidia (Modern GZDoom)
Location: Finland
Contact:

Re: why me

Post by MFG38 »

ramon.dexter wrote:Are you loading gzdoom.pk3 as a resource?
Loading gzdoom.pk3 as a resource is only necessary if you're using ZScript, which this person isn't judging by the syntax of the code.
Post Reply

Return to “Scripting”