Summoning Pistol Crashes GZDoom

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
Beetow Brode
Posts: 69
Joined: Sat Sep 24, 2016 1:46 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: "We've Got Hostiles"

Summoning Pistol Crashes GZDoom

Post by Beetow Brode »

So I made A Pistol and when I try to use it it doesnt show up like for example when I use the give command
but when I typed in summon it crashed, no crash message just GZDoom is not responding and it took quite a while to close
User avatar
Beetow Brode
Posts: 69
Joined: Sat Sep 24, 2016 1:46 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: "We've Got Hostiles"

Re: Summoning Pistol Crashes GZDoom

Post by Beetow Brode »

Oh S*&% I forgot the code here you go

Code: Select all

ACTOR PISTOLA : Weapon
{
Weapon.SelectionOrder 2900
Weapon.AmmoUse 1
Weapon.SlotNumber 2
Weapon.AmmoGive 40
Weapon.AmmoType "Clip"
scale 1.5
AttackSound "SNDGN1"
+WEAPON.WIMPY_WEAPON
Inventory.Pickupmessage "Picked up a Shitty Pistol."
States
{
Spawn:
PISO E 0
loop
Ready:
PISO A 1 A_WeaponReady
Loop
Select:
PISO A 1 A_WeaponReady
Loop
Deselect:
PISO A 1 A_WeaponReady
Loop
Fire:
PISO A 1
PISO B 2 
PISO C 2 A_FireBullets(5.2,1,1,75)
PISO D 1 
Loop
}
}
User avatar
Arctangent
Posts: 1235
Joined: Thu Nov 06, 2014 1:53 pm
Contact:

Re: Summoning Pistol Crashes GZDoom

Post by Arctangent »

Beetow Brode wrote:

Code: Select all

Spawn:
PISO E 0
loop
welcome to zero-duration infinite loops, bud

they'll stick with you throughout your entire coding career, you'll just get better at spotting them after the fact
Post Reply

Return to “Scripting”