Professional Documents
Culture Documents
Mission 9 User Controls
Mission 9 User Controls
User Controls
https://roderickvella.wordpress.com
Mission Objectives
Welcome to your 9th mission. In this
mission we are going to learn how use
button pressed commands.
Button Pressed
Something happens when the user
presses a button.
Mission 9 : Prog 1
In this example we are going to output
a message on the screen for varies
buttons pressed by the player.
Step 1
while(true)
Line 144
Line 149
if( self
adsbuttonpressed())
Line 154
if( self
meleeButtonPressed() )
Line 159
if( self
fragbuttonpressed())
Line 164
if(self
UseButtonPressed())
Line 169
wait(0.05);
Mission 9 : Prog 2
In Mission 9 Prog 1 we have a small
problem.
Although the player presses a particular
button only once, COD interprets this as
if the player presses the button multiple
times. Lets see a video to better
understand the problem.
Mission 9 : Prog 2
Mission 9 : Prog 2
In this mission we are going to solve
this problem.
We are going to test this on the Aim
Down Sight button.
Step 1
Mission 9 : Prog 2
Mission 9 Task 1
Fix the following code. When the player presses
the attack button, the screen should get more
blurred. The end result should be like in the
video.
Mission 9 Task 1
Mission 9 Task 1