@Ed222: Hello, Ed222! =)
Now I am no expert at DBC because I do not have it, however, from what I've learned over the past few years, should help you out, if not alot, at least a bit =) (Experienced coders, correct my code if I am wrong in any way), but here is my shot at how you should use keystates:
`*SPECIAL NOTE: FOR ALL NOTES, "<>" = "not"
`NOTE I: This basically says if you press the "a" key and the "a" key is "NOT" = to 0, and your sprite is not mirrored then activate the rest of your code.
`NOTE II: For this, if you press the "d" key, and the "d" key is NOT = to 0 and timecounter is "NOT" = to 0, then activate the rest of your code.
`NOTE III: Same as Note II (See Note II), only if you press the "d" key, and the "d" key is NOT = to 0, and timecounter IS = to 0, then activate the rest of your code.
`NOTE IV: For this, if you press the "a" key, and the "a" key is NOT equal to 0, and your sprite is "NOT" mirrored, then activate
the rest of your code.
`NOTE V: For this, if you press the "a" key, and the "a" key is "NOT" equal to 0, and your sprite "IS" mirrored, then activate the rest of your code.
`NOTE VI: For this, if you press the "a" key, and the "a" key is "NOT" = to 0, and timecounter "DOES" = 0, then activate the rest of your code.
`NOTE VII: Finally, for this, if you do "NOT" press the "a" key, and you do "NOT" press the "d" key, then activate the rest of your code.
if keystate(30) <> 0 and sprite mirrored(2) <> 0 `READ NOTE I
mirror sprite 2
2x=2x+2
endif
if keystate(32) <> 0 and timecounter <> 0 `READ NOTE II
2x=2x+2
else
if keystate(32) <> 0 and timecounter = 0 `READ NOTE III
sec = sec +1
if sec >29
sec = 25
endif
endif
endif
if keystate(30) <> 0 and sprite mirrored(2) = 0 `READ NOTE IV
mirror sprite 2
2x=2x-2
else
if keystate(30) <> 0 and sprite mirrored(2) <> 0 `READ NOTE V
2x=2x-2
endif
endif
if keystate(30) <> 0 and timecounter = 0 `READ NOTE VI
sec = sec +1
if sec >29
sec = 25
endif
endif
if keystate(30) = 0 and keystate(32) = 0 `READ NOTE VII
sec = 25
endif
EDIT: In the event that DBC does not let you use the "<>" not symbol, then just replace it with "=1" =)
I hope this helps you! =)
Good luck with your project! =)
~M.W~