for my timer i use this , found on this forum , i dont remember the name of the creator
function Ini_Timer()
Beg_Time# = timer() + 1000
endfunction
Function Update_Timer()
Time_Update# = timer()
if Time_Update# > Beg_Time#
Time_Speed# = (Time_Update# - Old_Time#)/10
Old_Time# = Time_Update#
endif
endfunction
and multiplicate all my movement by : Time_Speed#
for adjust my gun i need to call this function all loop , else i have a problem , the timer dont work perfect
function AdjustGunAnim()
set object speed Gun(OldGunSelected).GunID,AnimSpeed*Time_Speed#
set object speed Gun(GunSelected).GunID,AnimSpeed*Time_Speed#
endfunction
for my bullets i use sparky collision system :
- my bullets creation function
function CreateBullets()
Bullets(1).Object = freeObject()
load object "Data/Wearpons/Brass/Rifle/Rifle.x",Bullets(1).Object
rem make object sphere Bullets(1).Object,5
hide object Bullets(1).Object
EXCLUDE OBJECT ON Bullets(1).Object
SC_setupObject Bullets(1).Object,0,0
For N=2 To 50
Bullets(N).Object = freeObject()
clone object Bullets(N).Object, Bullets(1).Object
SC_setupObject Bullets(N).Object,0,0
Bullets(N).Fired = 0
Bullets(N).Hit = 0
hide object Bullets(N).Object
EXCLUDE OBJECT ON Bullets(N).Object
Next N
endfunction
- my colision check
x#=object position x(Bullets(X).Object)
y#=object position y(Bullets(X).Object)
z#=object position z(Bullets(X).Object)
collide=SC_rayCastGroup(TYPE_WORLD_STONE,Bullets(X).Bulletoldx#,Bullets(X).Bulletoldy#,Bullets(X).Bulletoldz#,x#,y#,z#,0)
Bullets(X).Bulletoldx#,Bullets(X).Bulletoldy#,Bullets(X).Bulletoldz# , is the update of the position of the bullets when i move it
and all my gun is from the FPSC Pack and work perfect for me
Roka The French Boy