SlideShare a Scribd company logo
Fixing
the Rock
Throw

We wanted the player to not be able to old
down the K button and endlessly throw rocks,
so they have to press the button again for
another rock to be spawned.

We already had an attribute; 'Rock Thrown'
that was created to delay a second rock
being thrown. What Aaron had previously
set up was some logic that stated the rock
could only be thrown if 'Rock Thrown' = 0.
There is also a second attribute named
‘Throwing Rock’, that controls the
animation. If it’s true the throwing
animation plays, and if false it stops.
When K is pressed and the rock is spawned
Rock Throw changes to 1 and Throwing
Rock to true, meaning the rock can't be
thrown again and the animation plays. A
timer then switches the attributes back to 0
and false after 0.3 seconds, so you can throw
again, but 0.03 seconds after you first
threw.
What we wanted was for the player to have to
release the key ad press it again in order to be able
to fire again. I remembered that when setting up a
rule and the conditions, there was an option to make
the condition that a key was up, rather then down.
So first I turned that timer logic off, so that now
after you throw a rock it never changes back to 0:
you can't throw again. Next I created a new rule,
that states if K is UP, then Rock Thrown should
change to 0, and Throwing Rock is false

Whilst this did space out the spawning of
the rocks, it didn't stop them endlessly
spawning with the key pressed down.

Squid can only throw a second
rock if the attribute is 0. After
firing once it changes to 1. It only
changes back to 0 if the K key goes
up. The rock throwing is limited to
one rock spawning until you
release the K key and press it
again.
Whilst the rock mechanic was all fixed, this
method didn’t quite work with the animation
and so needed adjustment. What was happening
was that Throwing Rock was being set to false
upon the key going up, stopping the animation.
This meant that it didn’t run to completion,
often just showing the first frame before being
cut off.
So first I took that change attribute out of the
Throw again rule, as clearly that wasn’t working.

I then made a timer in the Throwing rule, much like the
timer that originally re-set the attributes. I made it re-set
the Throwing Rock attribute after 0.3 seconds. No the
animation plays out even after the K key goes up.
It’s the same set up as before, except now it only resets
the animation attribute, ending the animation, and the
attribute that controls weather or not the player can
throw a rock is reset in a different rule.

More Related Content

PPT
Moments
DOC
PDF
Session 08 – particle instancer
PDF
ODP
Résultats Garden Party
PDF
Cuttlefish and Potatoes
DOCX
Albert gil
DOC
KG Alumni Listserv - issue 351, April 1, 2011
Moments
Session 08 – particle instancer
Résultats Garden Party
Cuttlefish and Potatoes
Albert gil
KG Alumni Listserv - issue 351, April 1, 2011

Viewers also liked (20)

PPTX
Final curriculum night 2013
PPT
STAY HEALTHY!!
PDF
Flite #11 labels2
DOC
Anita Desa1
PPT
Teachers
PPT
2000 Calories Diet
PDF
AshStat - Confirmed reports of ash dieback disease (Hymenoscyphus fraxineus) ...
PDF
Flamingo Art The Promise
PPS
Paisagens Suiças
PPTX
El Desarrollo De La Inteligencia Emocional
PPT
Bkk french touch foosball tables companies
PPTX
Theuniverse and the Earth
PPS
Figaronron - Les feux de la st-Jean 02 (26-06-2009)
PPS
Motos
PPTX
2 data 2011
PPT
대통령과 언론 우수과제 - 박정희대통령
PDF
EMERGENCY BLANKETS IR
PPT
Opiniones y comentarios clientes Entremares - Valoraciones encuestas sobre el...
PDF
Galerie images atelier créatif
Final curriculum night 2013
STAY HEALTHY!!
Flite #11 labels2
Anita Desa1
Teachers
2000 Calories Diet
AshStat - Confirmed reports of ash dieback disease (Hymenoscyphus fraxineus) ...
Flamingo Art The Promise
Paisagens Suiças
El Desarrollo De La Inteligencia Emocional
Bkk french touch foosball tables companies
Theuniverse and the Earth
Figaronron - Les feux de la st-Jean 02 (26-06-2009)
Motos
2 data 2011
대통령과 언론 우수과제 - 박정희대통령
EMERGENCY BLANKETS IR
Opiniones y comentarios clientes Entremares - Valoraciones encuestas sobre el...
Galerie images atelier créatif
Ad

More from Phoenix Smith (20)

PDF
Graphic Design Presentation
PDF
Graphic design Schedule
PDF
Graphic Design Evalutation
PDF
Squidiverse Marketing Presentation
PDF
Advanced animation & motion capture
PDF
Animation Studio Research
PDF
Animation Character Study
PDF
Hunted Evaluation
PDF
Photoshoot Plan
PDF
Marketing Meeting
PDF
T-shirt Comparison research
PDF
Graphic Design: App store logo
PDF
Gamesalad Evaluation
PDF
Game Designer Job Role
PDF
Games Artist Job Role
PDF
Squidiverse Production Pipeline
PDF
Game Directors Profile
PDF
Titanfall Box Art Anotation
PDF
Squidiverse walkthrough
PDF
'Squidiverse' 10 point Design Document
Graphic Design Presentation
Graphic design Schedule
Graphic Design Evalutation
Squidiverse Marketing Presentation
Advanced animation & motion capture
Animation Studio Research
Animation Character Study
Hunted Evaluation
Photoshoot Plan
Marketing Meeting
T-shirt Comparison research
Graphic Design: App store logo
Gamesalad Evaluation
Game Designer Job Role
Games Artist Job Role
Squidiverse Production Pipeline
Game Directors Profile
Titanfall Box Art Anotation
Squidiverse walkthrough
'Squidiverse' 10 point Design Document
Ad

Recently uploaded (20)

PDF
Emailing DDDX-MBCaEiB.pdf DDD_Europe_2022_Intro_to_Context_Mapping_pdf-165590...
PDF
Integrated-2D-and-3D-Animation-Bridging-Dimensions-for-Impactful-Storytelling...
PPT
UNIT I- Yarn, types, explanation, process
PDF
Key Trends in Website Development 2025 | B3AITS - Bow & 3 Arrows IT Solutions
PDF
UNIT 1 Introduction fnfbbfhfhfbdhdbdto Java.pptx.pdf
PPTX
Special finishes, classification and types, explanation
PPTX
AC-Unit1.pptx CRYPTOGRAPHIC NNNNFOR ALL
PDF
Facade & Landscape Lighting Techniques and Trends.pptx.pdf
DOCX
actividad 20% informatica microsoft project
PDF
Trusted Executive Protection Services in Ontario — Discreet & Professional.pdf
PPTX
ANATOMY OF ANTERIOR CHAMBER ANGLE AND GONIOSCOPY.pptx
PPTX
CLASSIFICATION OF YARN- process, explanation
PPTX
EDP Competencies-types, process, explanation
PDF
YOW2022-BNE-MinimalViableArchitecture.pdf
PPT
pump pump is a mechanism that is used to transfer a liquid from one place to ...
PPTX
YV PROFILE PROJECTS PROFILE PRES. DESIGN
PPTX
BSCS lesson 3.pptxnbbjbb mnbkjbkbbkbbkjb
PPT
Machine printing techniques and plangi dyeing
PDF
Phone away, tabs closed: No multitasking
PPTX
An introduction to AI in research and reference management
Emailing DDDX-MBCaEiB.pdf DDD_Europe_2022_Intro_to_Context_Mapping_pdf-165590...
Integrated-2D-and-3D-Animation-Bridging-Dimensions-for-Impactful-Storytelling...
UNIT I- Yarn, types, explanation, process
Key Trends in Website Development 2025 | B3AITS - Bow & 3 Arrows IT Solutions
UNIT 1 Introduction fnfbbfhfhfbdhdbdto Java.pptx.pdf
Special finishes, classification and types, explanation
AC-Unit1.pptx CRYPTOGRAPHIC NNNNFOR ALL
Facade & Landscape Lighting Techniques and Trends.pptx.pdf
actividad 20% informatica microsoft project
Trusted Executive Protection Services in Ontario — Discreet & Professional.pdf
ANATOMY OF ANTERIOR CHAMBER ANGLE AND GONIOSCOPY.pptx
CLASSIFICATION OF YARN- process, explanation
EDP Competencies-types, process, explanation
YOW2022-BNE-MinimalViableArchitecture.pdf
pump pump is a mechanism that is used to transfer a liquid from one place to ...
YV PROFILE PROJECTS PROFILE PRES. DESIGN
BSCS lesson 3.pptxnbbjbb mnbkjbkbbkbbkjb
Machine printing techniques and plangi dyeing
Phone away, tabs closed: No multitasking
An introduction to AI in research and reference management

Fixing the Rock Throw Bug - Write Up

  • 1. Fixing the Rock Throw We wanted the player to not be able to old down the K button and endlessly throw rocks, so they have to press the button again for another rock to be spawned. We already had an attribute; 'Rock Thrown' that was created to delay a second rock being thrown. What Aaron had previously set up was some logic that stated the rock could only be thrown if 'Rock Thrown' = 0. There is also a second attribute named ‘Throwing Rock’, that controls the animation. If it’s true the throwing animation plays, and if false it stops. When K is pressed and the rock is spawned Rock Throw changes to 1 and Throwing Rock to true, meaning the rock can't be thrown again and the animation plays. A timer then switches the attributes back to 0 and false after 0.3 seconds, so you can throw again, but 0.03 seconds after you first threw. What we wanted was for the player to have to release the key ad press it again in order to be able to fire again. I remembered that when setting up a rule and the conditions, there was an option to make the condition that a key was up, rather then down. So first I turned that timer logic off, so that now after you throw a rock it never changes back to 0: you can't throw again. Next I created a new rule, that states if K is UP, then Rock Thrown should change to 0, and Throwing Rock is false Whilst this did space out the spawning of the rocks, it didn't stop them endlessly spawning with the key pressed down. Squid can only throw a second rock if the attribute is 0. After firing once it changes to 1. It only changes back to 0 if the K key goes up. The rock throwing is limited to one rock spawning until you release the K key and press it again.
  • 2. Whilst the rock mechanic was all fixed, this method didn’t quite work with the animation and so needed adjustment. What was happening was that Throwing Rock was being set to false upon the key going up, stopping the animation. This meant that it didn’t run to completion, often just showing the first frame before being cut off. So first I took that change attribute out of the Throw again rule, as clearly that wasn’t working. I then made a timer in the Throwing rule, much like the timer that originally re-set the attributes. I made it re-set the Throwing Rock attribute after 0.3 seconds. No the animation plays out even after the K key goes up. It’s the same set up as before, except now it only resets the animation attribute, ending the animation, and the attribute that controls weather or not the player can throw a rock is reset in a different rule.