I've read the post 'kool weapon cycler' in the code snippet post, and try to use the code. The problem is that the thing whith the function doesn't work, the one whith the subroutines does work, but the problem is my game doesn't react if I cycle trough my gun. How can I make it work???
Here's the code:
first this
rem weapons cycler
if keystate(2)=1 gosub gun_cycler_1
rem weapon 2
if keystate(3) then gosub gun_cycler_2
then this
rem show gun 1
Gun_cycler_1:
rem rotate weapons not in use inwards
angle = 0
repeat
position camera x#,y#+50,z#
inc angle,5
Xrotate object 1,angle
sync
until angle > 170
rem hide other weapons
hide object 4
hide object 5
rem show new weapon to pull out
show object 1
rem now pull out weapon 1
angle = 100
repeat
inc angle,5
Xrotate object 1,wrapvalue(angle)
sync
until angle > 360
return : rem now return to main game loop
rem show gun 2
Gun_cycler_2:
rem rotate weapons not in use inwards
angle = 0
repeat
position camera x#,y#+50,z#
inc angle,5
Xrotate object 1,angle
sync
until angle > 170
rem hide other weapons
hide object 1
rem show new weapon to pull out
show object 4
show object 5
rem now pull out weapon 1
angle = 100
repeat
inc angle,5
Xrotate object 4,wrapvalue(angle)
Xrotate object 5,wrapvalue(angle)
sync
until angle > 360
return : rem now return to main game loop
We're all Christ and we're all Hitler.We want Christ to win.What would he've done if he had advertisements, T.V. and newspapers?The miracle today is communication.So let's use it.-John Lennon '69