Thread: Blitz3D
View Single Post
Old 06-22-2005, 08:25 PM   #1 (permalink)
Freerefill
caffeine junky O.O
 
Freerefill's Avatar
 
Join Date: Jun 2005
Location: second star to the right, and straight on till morning
Posts: 1
Freerefill is on a distinguished road
Blitz3D

im in dire need of assistance. ive been stuck on this problem for 3 days now and ive gotten no work done because of it.

im a novice at using Blitzplus and Blitz3D, in fact i havent even coded a complete game yet (that wasnt a tutorial at least), but ive been hard at work trying new things, as any novice programmer would.

im trying to write a program thatll let me create an object with a number of characteristics using one function and then update their position with another function in the main loop. after a number of "Memory Access Violation"'s, i decided to debug it using a much simpler version of the program. in fact, i got rid of the second function entirely. here's my code:

Graphics3D 800,600
SetBuffer BackBuffer()
cam1 = CreateCamera()
PositionEntity cam1,0,0,-5

Function createobject()
sphere = CreateSphere()
End Function

createobject()

While Not KeyHit(1)
UpdateWorld
RenderWorld
TurnEntity name,0,1,0
Flip
Wend
End


this is the code that doesnt work. i believe the problem is that somehow the handle of the entity (sphere) doesnt stick with the entity after its created. so once the function is done, everything that was created exists, but the handle just disappears. whats the problem, and is there a solution?

many thanks in advance, this problem has been killing me for quite some time
Freerefill is offline   Reply With Quote