I have a gun im trying to position right in front of the camera on load, but it wont do it right.
This is very messy and I indent my code weirdly.
This is very messy and I indent my code weirdly.
Function Load_Weapon(TempFile$,TempName$,TempAmmoMax%,TempAmmoCur%,TempAmmoType,TempWeaponDelay%,TempTexture$,TempColor1%,TempColor2%,TempColor3%,TempScale1#,TempScale2#,TempScale3#,TempRotate%) Weapon% = LoadMesh(TempFile$) If Not Weapon% RuntimeError "Error Loading Weapons!" End If WeaponName$ = TempName$ If TempTexture$ <> "" TempWeaponTexture$ = LoadTexture(TempTexture$) If Not TempWeaponTexture$ RuntimeError "Error Loading Weapons!" End If End If If TempTexture = "" EntityColor Weapon%,TempColor1%,TempColor2%,TempColor3% End If ScaleEntity Weapon%,TempScale1#,TempScale2#,TempScale3# WeaponID% = NewWeaponID() AmmoMax% = TempAmmoMax% AmmoCur% = TempAmmoCur% AmmoType% = TempAmmoType% WeaponDelay% = TempWeaponDelay% RotateEntity weapon,-180,180,0 PositionEntity weapon,X#+0.8,Y#-0.5,Z#+1.4 EntityParent Weapon%,Camera% End Function