The easiest way to do it would be to create a variable (maybe called "gun"). When certain keys are pressed, certain values are assigned to the variable (i.e. pressing 1 sets "gun" to 1). Then, if you have a sprite for all of the guns, have it switch to costume "gun" (1) which would be an ak47 for you
Offline
^ that, in scratchblocks it'd be
when gf clicked
forever
if <key [1 v] pressed>
set [gun v] to [1]
end
if <key [2 v] pressed>
set [gun v] to [2]
end
if <(gun) = [1]>
change to costume [firstgun v}
end
if <(gun) = [2]>
change to costume [secondgun v}
end
end
Offline
zammer990 wrote:
^ that, in scratchblocks it'd be
when gf clicked forever if <key [1 v] pressed ?> set [gun v] to [1] end if <key [2 v] pressed ?> set [gun v] to [2] end switch to costume (gun)
Blocks fixed and improved.
Last edited by jontmy00 (2012-05-06 02:50:43)
Offline