Posted: 11th Apr 2004 19:00
This is just a little code to let you switch between:
No guns
Gun 1
Gun 2


No media required and feel free to use whether you want. Only a very basic code.

[center]I might make more of these in the very near future. More advanced codes. This is meant for beginners[/center]
Posted: 11th Apr 2004 19:33
Sorry. Missed out the 'LOOP' function. Stupi I know. Heres the new code:

+ Code Snippet
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