I got a little problem with my shooting. When the key is pressed, it launches 2 missiles and the speed increases as it moves off, but when you fire a second set of missiles and so on, they no longer move off from slow to fast, its just fast. Here is the code for it, also if anyone has any tips on how this code could be modified that would be helpfull too.
`***************Outer Missile Left(Lock on)************************
set cursor 10,10
If Keystate(157)=1 and LockShotL=200 and ML >=1
LockShotL = 200
while object exist(LockShotL) = 1
Inc LockShotL
endwhile
clone object LockShotL,6
position object LockShotL,Object Position X(6),Object Position Y(6),Object Position Z(6)
Rotate Object LockShotL,Object Angle X(6),Object Angle Y(6),Object Angle z(6)
dec ML
hide object 2
hide object 4
endif
if keystate(157)= 0 then LockShotL=200 : show object 2 : show object 4
For LockShotMoveL = 200 to 400
if object exist(LockShotMoveL)
`************
move object LockShotMoveL,LLS
inc LLS#,1
if LLS#<0 then LLS#=0
If LLS#>300 then LLS#=300
`************
endif
next LockShotMoveL
`*******************************************************
`***************Outer Missile Right(Lock on)************************
set cursor 10,10
If Keystate(157)=1 and LockShotR=200 and ML >=1
LockShot = 200
while object exist(LockShotR) = 1
Inc LockShotR
endwhile
clone object LockShotR,8
position object LockShotR,Object Position X(8),Object Position Y(8),Object Position Z(8)
Rotate Object LockShotR,Object Angle X(8),Object Angle Y(8),Object Angle z(8)
hide object 2
hide object 4
endif
if keystate(157)= 0 then LockShotR=200 : show object 2 : show object 4
For LockShotMoveR = 200 to 400
if object exist(LockShotMoveR)
`************
move object LockShotMoveR,RLS#
inc RLS#,1
if RLS#<0 then RLS#=0
If RLS#>300 then RLS#=300
`************
endif
next LockShotMoveR
`*******************************************************
`*************Inner Missile Left (Non Lock on)*************************
set cursor 10,10
If keystate(54)=1 and NonLockShotL=200 and MN >=1
NonLockShotL = 200
while object exist(NonLockShotL) = 1
Inc NonLockShotL
endwhile
clone object NonLockShotL,7
position object NonLockShotL,Object Position X(9),Object Position Y(9),Object Position Z(9)
Rotate Object NonLockShotL,Object Angle X(9),Object Angle Y(9),Object Angle z(9)
dec MN
hide object 3
hide object 5
endif
if keystate(54)= 0 then NonLockShotL=200 : show object 3 : show object 5
For NonLockShotMoveL = 200 to 400
if object exist(NonLockShotMoveL)
`************
move object NonLockShotMoveL,LNS#
inc LNS#,1
if LNS#<0 then LNS#=0
If LNS#>300 then LNS#=300
`************
endif
next NonLockShotMoveL
`***********************************************************************
`*************Inner Missile Right (Non Lock on)*************************
set cursor 10,10
If keystate(54)=1 and NonLockShotR=200 and MN >=1
NonLockShot = 200
while object exist(NonLockShotR) = 1
Inc NonLockShotR
endwhile
clone object NonLockShotR,9
position object NonLockShotR,Object Position X(9),Object Position Y(9),Object Position Z(9)
Rotate Object NonLockShotR,Object Angle X(9),Object Angle Y(9),Object Angle z(9)
hide object 3
hide object 5
endif
if keystate(54)= 0 then NonLockShotR=200 : show object 3 : show object 5
For NonLockShotMoveR = 200 to 400
if object exist(NonLockShotMoveR)
`************
move object NonLockShotMoveR,RNS
inc RNS#,1
if RNS#<0 then RNS#=0
If RNS#>300 then RNS#=300
`************
endif
next NonLockShotMoveR
`***********************************************************************
[EDIT] Also is it possible to put this code, or parts of this code into one line, like the function thing, so that it does not look so big?
http://www.Bevansfunbox.com