Ask about ACS, DECORATE, ZScript, or any other scripting questions here!
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!)
I'm trying to spruce up Mario Doom from a visual replacement to a full gameplay mod.
Trying to add a tracer to Super Shotgun replacement, FirePiranha breaks stuff:
Spoiler:
I have no idea why would GZDoom expect a comma for the string name. From what I understand, what is supposed to go here is just name of the missile actor spawned for the tracer. I used that with no problems at all for the Shotgun replacement and it works great.
Trying to figure out this stuff, I decided to do what it asks me to, and put in "," for the string name, silly as it sounds.
It parses this line just fine, but then:
I'm getting an even more bizarre error:
Spoiler:
Line 73 is... inside of a comment. Here's my full Decorate file:
Spoiler:
ACTOR ShotgunSeed // tracer I'm currently trying to use and I use it in shotgun replacement with zero problems.
{
Game Doom
Radius 6
Height 8
Speed 100
FastSpeed 100
Damage 0
Projectile
+BLOODLESSIMPACT
+RANDOMIZE
States
{
Spawn:
PLSE D 4 bright
loop
Death:
PLSE E 6 bright
stop
}
}
ACTOR ShotgunFire : ShotgunSeed
{
States
{
Spawn:
BAL1 A 1 bright
BAL1 B 1 bright
loop
Death:
BAL7 C 6 bright
stop
}
}
ACTOR PiranhaPlant : Shotgun
replaces Shotgun
{
Weapon.SlotNumber 3
States
{
Fire:
SHTG A 3
SHTG A 7
{
A_StartSound("weapons/shotgf", CHAN_WEAPON, CHANF_DEFAULT, 1.0);
A_GunFlash;
A_FireBullets (5.6, 0, 7, 5, "BulletPuff", FBF_USEAMMO, 8192, "ShotgunSeed", 14, 0);
}
SHTG BC 5
SHTG D 4
SHTG CB 5
SHTG A 3
SHTG A 7 A_ReFire
Goto Ready
}
}
ACTOR FirePiranha : SuperShotgun
replaces SuperShotgun
{
Weapon.SlotNumber 3
States
{
Fire:
SHT2 A 3
{
A_StartSound("weapons/sshotf", CHAN_WEAPON, CHANF_DEFAULT, 1.0);
A_GunFlash;
A_FireBullets (11.2, 7.1, 20, 5, "BulletPuff, FBF_USEAMMO, 8192, ",", 14, 0); // originally, "," was "ShotgunSeed" which brought up the original error.
}
//SHT2 A 0 A_StartSound ("weapons/sshotf", CHAN_WEAPON) <<< that's line 73
//SHT2 A 7 A_GunFlash
//SHT2 A 0 A_FireBullets (11.2, 7.1, 20, 5, "BulletPuff, FBF_USEAMMO, 8192, "ShotgunSeed", 14, 0)
SHT2 B 7
SHT2 C 7 A_CheckReload
SHT2 D 7 A_OpenShotgun2
SHT2 E 7
SHT2 F 7 A_LoadShotgun2
SHT2 G 6
SHT2 H 6 A_CloseShotgun2
SHT2 A 5 A_ReFire
Goto Ready
}
}
I don't understand why GZdoom is even parsing strings inside comment tags. That hints to me something is seriously screwed up, or more likely, I screwed up something really bad.
You forgot to close the string after "BulletPuff, which makes the following lines be treated as a string until the next closing quote, which is why GZDoom threw an error regarding ShotgunSeed.