Strike Exploit

While reviewing the code at the end of the section for BowlMaster, I found an exploitable bug. After throwing a strike or the last bowl of a frame, the ball will reset before the swiper is finished. If you throw the ball off of the lane while it’s animating, the game will think you hit all of the pins because the swiper knocked them over. This can be repeated to achieve a strike in every frame.

To solve this, I added a new variable for holding the Animator of the Pin Setter. Then, on the DragEnd code, do a check to ensure that the swiper is idle before proceeding to throw the ball. This stops the player from bowling while the swiper is moving and also prevents them from using the exploit.

The code I used for the check is as follows:

if(pinSetterAnimator.GetCurrentAnimatorStateInfo(0).IsName("Idle"))

Where the pinSetterAnimator is given the Animator of the Pin Setter in the Start method

2 Likes

Well spotted and thanks for sharing Brian.

Privacy & Terms