So this works
remstart
Controls:
UP = show gun 1
DOWN = show gun 2
LEFT = show no guns
remend
rem make the guns - you should replace these with gun models
make object cylinder 1,2
make object cube 2,4
rem rotate objects to form a gun
rotate object 1,90,1,1
rotate object 2,90,1,1
rem position objects in the right place - where you hold a gun
position object 1,1,-7,1.5
position object 2,1,-7,1.5
rem hide both guns - when a=3 nboth guns hidden (see a=3 below)
a=3
rem begin loop
do
rem a=1 - show gun 1
if a=1
show object 1
hide object 2
endif
rem a=2 - show gun 2
if a=2
show object 2
hide object 1
endif
rem a=3 - hide both guns
if a=3
hide object 1
hide object 2
endif
rem when up key pressed perform a=1(show gun 1)
if upkey()=1
a=1
endif
rem when down key pressed perform a=2(show gun 2)
if downkey()=1
a=2
endif
rem when left key pressed perform a=3(hide both guns)
if leftkey()=1
a=3
endif
rem end loop
loop
But this doesn't?
remstart
Controls:
UP = show gun 1
DOWN = show gun 2
LEFT = show no guns
remend
rem make the guns - you should replace these with gun models
make object cylinder 1,2
make object cube 2,4
rem rotate objects to form a gun
rotate object 1,90,1,1
rotate object 2,90,1,1
rem position objects in the right place - where you hold a gun
position object 1,1,-7,1.5
position object 2,1,-7,1.5
rem hide both guns - when a=3 nboth guns hidden (see a=3 below)
a=3
rem begin loop
do
rem a=1 - show gun 1
if a=1
show object 1
hide object 2
endif
rem a=2 - show gun 2
if a=2
show object 2
hide object 1
endif
rem a=3 - hide both guns
if a=3
hide object 1
hide object 2
endif
rem when 1 key pressed perform a=1(show gun 1)
if keystate(2)=1
a=1
endif
rem when 2 key pressed perform a=2(show gun 2)
if keystate(3)=1
a=2
endif
rem when 3 key pressed perform a=3(hide both guns)
if keystate(4)=1
a=3
endif
rem end loop
loop