A_FireProjectile does not work inside zscript action methods

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
User avatar
insightguy
Posts: 1730
Joined: Tue Mar 22, 2011 11:54 pm

A_FireProjectile does not work inside zscript action methods

Post by insightguy »

*anymore

as of 3.2.5, my action method in my weapon no longer works

Code: Select all

	action void X_FlackBlast(float Hor, float Ver, int pellet, int position)
	{
		for (int counter = 0; counter < pellet; counter++)
		{
			A_FireProjectile("ShotgunPellet",FRandom(-Hor,Hor),0, position,5,FPF_NOAUTOAIM|FPF_AIMATANGLE,FRandom(-Ver,Ver));
		}
	}
I tried to remove the for loop, but that does not work either.


Last seen working on 3.2.3
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: A_FireProjectile does not work inside zscript action met

Post by _mental_ »

Post a runnable sample please.
User avatar
insightguy
Posts: 1730
Joined: Tue Mar 22, 2011 11:54 pm

Re: A_FireProjectile does not work inside zscript action met

Post by insightguy »

_mental_ wrote:Post a runnable sample please.
I can't I updated to GZdoom 3.2.5 and lost the previous version.

if your talking about the mod, note that it's not complete and the shotguns don't work (because of the aforementioned problem), here
Just please don't start passing it off as your own work.
User avatar
Mikk-
Posts: 2274
Joined: Tue Jun 30, 2009 1:31 pm
Location: Somewhere off Kanagawa

Re: A_FireProjectile does not work inside zscript action met

Post by Mikk- »

Well no wonder it doesn't work... Here is your shotgun pellet code

Code: Select all

Class ShotgunPellet : CustomInventory
{
    Default
    {
        Speed  60;
        Radius 1;
        Height 0;
        Damage 3;
        +CANNOTPUSH;
        +NODAMAGETHRUST;
        Scale 0.25;
    }
    States
    {
    Spawn:
        TNT1 A 1;
        Loop;
    Death:
        PUFF ABCD 2 Bright;
        Stop;
    }
}
One, why is it a CustomInventory? Two, it doesn't have the Projectile Combo [not necessary but convenient], the +MISSILE flag is needed here. Three, the small size properties will most likely cause issues down the line with collision.
User avatar
insightguy
Posts: 1730
Joined: Tue Mar 22, 2011 11:54 pm

Re: A_FireProjectile does not work inside zscript action met

Post by insightguy »

Mikk- wrote:One, why is it a CustomInventory? Two, it doesn't have the Projectile Combo [not necessary but convenient], the +MISSILE flag is needed here. Three, the small size properties will most likely cause issues down the line with collision.
well crap, I initially made this as a Fastprojectile but I honestly don't know why that changed, must have been me wanting to change it into a regular projectile but forgot "actor" and instead typed custominventory. looks like it's fixed thanks!

and thanks for the projectile combo and size property recommendation!
Post Reply

Return to “Closed Bugs [GZDoom]”