BlitzBasic does support 'else' and 'elseif' however using 'elseif' doesn't allow me to press 2 keys at once and travel diagonal.
Basicly you are not doing it with your code either. It moves your character at one direction first, and then to the other one and makes a illusion of diagonal movement.
If you want to be able to move in 8 directions (left, up, right, down and between them), you need to do a 8 IF lines.
Here it's in english.
Function movement()
If KEYUP and KEYLEFT then
set x and y
elseif KEYUP and KEYLEFT then
set x and y
elseif KEYDOWN and KEYLEFT then
set x and y
elseif KEYDOWN and KEYRIGHT then
set x and y
elseif KEYUP then
set x and y
elseif KEYLEFT then
set x and y
elseif KEYDOWN then
set x and y
elseif KEYRIGHT then
set x and y
endif
;draw player
Oval x, y, 10, 10
End Function
It is important to check if more than one key is pressed, or one of directions is not followed. When code hits to first elseif which fills the conditions, it makes it happend and escapes from the whole IF...THEN structure.
What 'BASIC' do you use?
yabasic, freebasic, bacon, smallbasic, runbasic and few others are my favorites. Though not too much time to use any basic currently :'(