I have two guns in my game (MP5s) that fire at the same time. I load them like this;
Rem mp5
load object "weapons\guns\MP5.X",7
Fix object pivot 7
Scale object 7,2600,2500,2500
position object 7,-5,-12,12
Lock object on 7
load object "weapons\guns\MP5.X",16
Fix object pivot 16
Scale object 16,2600,2500,2500
position object 16,5,-12,12
Lock object on 16
These work. When I try to fire, however, I only get 1 bullet at a time and that is always from a strange direction (i.e. a couple of game metres off the screen, but when the camera rotates the direction the bullets comes from changes). This is my code for loading the bullets.
Rem Make mp5 bullet
Make Object Sphere 9,2
texture object 9,4
scale object 9,50,100,50
Hide Object 9
Rem Make mp5 bullet
Make Object Sphere 17,2
texture object 17,4
scale object 17,50,100,50
Hide Object 17
And this is my code for firing the bullets.
if Mouseclick()=1 and BulletLifebeta=0 and bigammo#=>0 and tog=-1
play sound 1
bigammo#=bigammo#-1
Position object 9,X#-50,Y#+115,Z#
Set object to camera orientation 9
BulletLifebeta =10
Show object 9
endif
if Mouseclick()=1 and BulletLifebeta=0 and bigammob#=>0 and tog=-1
play sound 1
bigammob#=bigammob#-1
Position object 17,X#-50,Y#+115,Z#
Set object to camera orientation 17
BulletLifegamma =10
Show object 17
endif
This is my bulletlife command (so that there is not a constant stream of bullets, there is a delay between each one).
If BulletLifebeta > 0
Dec BulletLifebeta
Move object 9,20
If BulletLifebeta = 0 then Hide object 9
Endif
If BulletLifegamma > 0
Dec BulletLifegamma
Move object 17,20
If BulletLifegamma = 0 then Hide object 17
Endif
I have one other weapon, a colt and it works fine but it is only one gun and it is in the middle of the screen. I suspect that the problem may come form the positioning of the bullets to either side.
[img]

[/img]
Am I the only one here who's really confused?____________________________________________________________Into the shadow of the valley of Death rode the 500