Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
thrash
23
Years of Service
User Offline
Joined: 24th Mar 2003
Location:
Posted: 24th Mar 2003 17:46
hi all

just dropping a line to see if anyone can help me this is the code i am working on and when i enter the game the gun will never fire

[i]Rem Project: matrix
Sync On
Sync Rate 30
hide mouse
Rem make matrix
Make matrix 1,50000,50000,50,50

Rem Randomize the matrix
randomize matrix 1,125

position camera 24259.4,74.7542,486.431

Set camera range 1,5000
Fog on
Fog distance 3000
backdrop on
Fog color RGB(128,128,128)
Color Backdrop RGB(60,60,60)
Rem texture matrix
Load image "mars.jpg",1
Prepare matrix texture 1,1,2,2



Rem Main loop

rem Make Gun
Make object cylinder 1,2
XRotate Object 1,90
Fix object pivot 1
Scale object 1,100,100,500
position object 1,0,-7,15
Lock object on 1

Rem Make bullet
Make Object Sphere 2,2
Hide Object 2


Mouseclick()=1
Position object 2,X#,Y#+43,Z#
Set object to camera orientation 2
Show object 2


Do
set cursor 0,0
print X#
print Y#
print Z#

Rem Control input for camera
If Upkey()=1
XTest# = Newxvalue(X#,CameraAngleY#,20)
ZTest# = Newzvalue(Z#,CameraAngleY#,20)
If XTest#>0 and XTest#0 and ZTest#
Terabyte
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 24th Mar 2003 17:58
you have to rewrite the bullet code

type



I have a word of advice...
..don't piss on an electric fence!
Terabyte
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 24th Mar 2003 17:59
oh actualy type

if mouseclick()=1 the fire=1 : position object 2,camera position x(),camera position y(),camera position z() : set obejct to camera orientation : show object 2
if fire=1 then move object 2,10

sorry i forgot to show the bullet

dont forget to have some dort of life for your bullet or it will go on forever until you click!

I have a word of advice...
..don't piss on an electric fence!

Login to post a reply

Server time is: 2026-07-11 12:03:02
Your offset time is: 2026-07-11 12:03:02