Dear forum users! In compliance with the new European GDPR regulations, we'd just like to inform you that if you have an account, your email address is stored in our database. We do not share your information with third parties, and your email address and password are encrypted for security reasons.

New to the forum? Say hello in this topic! Also make sure to read the rules.

OnProjectileHit bouncy bullets are flagged for removal

Here you can find ScriptAPI suggestions implemented in the game.
Forum rules
By using the forum you agree to the following rules.
Locked
User avatar
Danger Ross
Superfighter
Superfighter
Posts: 146
Joined: Thu Mar 31, 2016 12:56 am
Title: Dangerous
SFD Alias: Danger Ross
Started SFD: 14 june 2012 (launch day)
Location: California
Gender:
Age: 19

OnProjectileHit bouncy bullets are flagged for removal

Post by Danger Ross » Wed Mar 25, 2020 10:26 am

Is this by design or a bug?
I've noticed that bouncy bullets that impact something that would break a normal bullet trigger the same flags despite not being removed. It was a little confusing to me because intuitively I understand that the bouncy bullet would still "survive" and not be removed.

This happens on the ProjectileHitCallback event.
1 x
sorry bucko, you can't punch with swords 8-)

NearHuscarl
Superfighter
Superfighter
Posts: 89
Joined: Thu Feb 07, 2019 4:36 am

Post by NearHuscarl » Wed Apr 15, 2020 12:37 pm

I think technically the game spawns a new projectile with the deflected angle and removes the old one, which is not what happen visually, This should be a bug because RemoveFlag's only job is to indicate whether the bullet still survives or not, which it fails to do.
0 x
Image

User avatar
Gurt
Lead Programmer
Lead Programmer
Posts: 1781
Joined: Sun Feb 28, 2016 3:22 pm
Title: Lead programmer
Started SFD: Made it!
Location: Sweden
Gender:
Age: 30

Post by Gurt » Sat Apr 25, 2020 2:51 pm

Fixed after v.1.3.5:
ScriptAPI: Added ProjectileHitArgs.IsDeflection, ProjectileHitArgs.DeflectionNormal to be able to read if a projectile hit is a deflection during ProjectileHitCallback.
ScriptAPI: ProjectileHitArgs.RemoveFlag is now false during deflections.
ScriptAPI: ProjectileHitCallback is now fired on blocking players and on ProjectileDeflectZone.
ScriptAPI: Added IProjectile.PowerupTotalBounces to read projectile's maximum total bounces that can be performed. IProjectile.BounceCount can now be written to to change current amount of bounces.
A player deflecting a bullet now counts towards the projectile's total bounce count property as if it would hit a wall during the bounce powerup.
0 x
Gurt

Locked