O dear, here i am with yet anotha wall to climb, hopefully someone will be able to give me a 'leg-up'
Basically, on my FPS im making, i want each weapon to have a certain range, tho when i change weapon the range doesnt hange with it.
The code will be a little sketchy, but bear with me.
I created an array 'weapon(4,6)' which holds the info for each weapon 'Range,Power,Ammo,MaxAmmo,MaxClip,Clip' This will never change, so i created other arrays for each type that r variables 'Range(4)'
when you change weapons, value 'G' changes eg. Pistol = 1 shotgun = 2 etc etc.
i use this code to fire the weapon
REM FIRE WEAPON
if mouseclick()=1
weapon(G,6)=weapon(g,6)-1
Set object to camera orientation 200
Position object 200,X#,Y#,Z#
gosub shootbullet
endif
this code is the Shootbullet subroutine
shootbullet:
move object 200,range(G)
return
no matter which weapon i use, it creates a sphere for the bullet at my co-ords and doesnt move it, yet when i change range(G) for a number like 500 it places it in the correct position.
Also, when i changed my weapon array from (1,6) to (4,6)
as i added more weapons, i lost the texture on the first weapon but all the others were fine. am rather confused about this now.
If this made no sense, let me know and i'll try to write it out better.