Download

Impossibug

I have four if statements that set the visibility of my laser whip… Laser whip visibility is set to false by default… If shooting is true set visibility false if shooting is false if melee stance is false set visibility false…
If melee is true if whip stance is true set visibility true… If whip stance is false if whip grab is true set visibility true if whip grab is false set visibility false…

That is the only function that sets the visibility of the whip in the game…

Some how the whip wasn’t visible during a whip stance move… Even though he wasn’t shooting he was definitely in melee stance and definitely in whip stance because he was performing whip stance specific moves…

In other words… Totally impossible…

Can you show the code?

so you have 4 if statements:

  • shooting
  • melee stance
  • whip stance
  • whip grab

aren’t melee and whip stance mutually exclusive?
is whip grab possible in melee stance or just in whip stance?

to me it seems you overcomplicated the matter. you should think of the most common situation that allows its visibility and go from there.
for example if melee is true AND whip stance is true OR whip grab is true then visibility is on. everything else falls under false.
i hope you are using logical operators in your class because it easier than doing ifs in ifs…

1 Like