Well, I might have typed in my code a little wrong, but
that is not the problem.
Ah yes! UDTs strike again!!!!
this code does not work:
function loadRunner(X AS FLOAT, Z AS FLOAT)
nRunner AS INTEGER
nObj AS INTEGER
nRunnerCounter = nRunnerCounter + 1
nRunner = nRunnerCounter
`sXPlayerFile
`LOAD OBJECT "C:\Program Files\Dark Basic Software\Dark Basic Professional\Projects\Alien Marathon\Alien.X", nObj
nObj = loadAnObject("Alien.x")
PLAY OBJECT nObj, 50, 50
ROTATE OBJECT nObj, 0, 180, 0
TEXTURE OBJECT nObj, nPLAYER_TEXTRE
SET OBJECT SMOOTHING nObj,100
playerInfo(nRunner).fSpeed = 0
playerInfo(nRunner).fMaxSpeed = 160
playerInfo(nRunner).PlayerObj = nObj
playerInfo(nRunner).bJoyStick = FALSE
playerInfo(nRunner).MouseOffsetX = screen width() / 16
playerInfo(nRunner).MouseOffsetY = screen height() / 26
endfunction nRunnerNumber
this code does work:
function loadRunner(X AS FLOAT, Z AS FLOAT)
nRunner AS INTEGER
nObj AS INTEGER
nRunnerCounter = nRunnerCounter + 1
nRunner = nRunnerCounter
`sXPlayerFile
`LOAD OBJECT "C:\Program Files\Dark Basic Software\Dark Basic Professional\Projects\Alien Marathon\Alien.X", nObj
nObj = loadAnObject("Alien.x")
PLAY OBJECT nObj, 50, 50
ROTATE OBJECT nObj, 0, 180, 0
TEXTURE OBJECT nObj, nPLAYER_TEXTRE
SET OBJECT SMOOTHING nObj,100
endfunction nRunnerNumber
the difference? on is using a UDT, the other is not!
scary ayyye!?
If you aim at nothing you'll hit it every time. 806mhz AMD Athlon Processor. 384MB memory.
Windows XP Home Edition. RADEON 9700 Pro graphics card. - editor.exe=1.0.6.1