Zorkaz Posted March 16, 2021 Share Posted March 16, 2021 I have this on my Perk script (Activate - AddActivateChance) When a certain enemy is near you'd fire projectiles depending on a controller quest, such as a laser projectile or a missile. But it won't work anymore, any clues? Int StageInt2 = STControllerQuest.getstage() If StageInt2 == 10 If PlayerRef.getvalue(ActionPoints) >= 15 AlienBlaster.Fire (PlayerRef, STAlienBlasterAmmo) PlayerRef.DamageValue(ActionPoints, 15) Else STNotenoughAPMsg.show() Endif Elseif StageInt2 == 20 If PlayerRef.getvalue(ActionPoints) >= 35 MissileLauncher.Fire (PlayerRef, STMissileAmmo) PlayerRef.DamageValue(ActionPoints, 35) Else STNotenoughAPMsg.show() Endif Elseif StageInt2 == 30 If PlayerRef.getvalue(ActionPoints) >= 15 LaserGun.Fire (PlayerRef, STLaserAmmo) PlayerRef.DamageValue(ActionPoints, 15) Else STNotenoughAPMsg.show() Endif Elseif StageInt2 == 40 If PlayerRef.getvalue(ActionPoints) >= 25 GaussRifle.Fire (PlayerRef, STGaussAmmo) PlayerRef.DamageValue(ActionPoints, 25) Else STNotenoughAPMsg.show() Endif Endif Link to comment Share on other sites More sharing options...
Zorkaz Posted March 16, 2021 Author Share Posted March 16, 2021 Works great on a regular activate basis. Might be that the Perk cannot read the Quest stage Link to comment Share on other sites More sharing options...
niston Posted March 16, 2021 Share Posted March 16, 2021 Add some Debug.Trace statements to find out. Link to comment Share on other sites More sharing options...
Recommended Posts