Help EntityParent

Blitz3D Forums/Blitz3D Programming/Help EntityParent

Yue(Posted 2010) [#1]
close entityparent program in debug mode if you notice = (


What the hell happens not try to engage one entity to another and the game will crash.


jfk EO-11110(Posted 2010) [#2]
Code? Maybe you parent them in a loop, like:

entityparent a,b
entityparent b,a

this of course would crash or at least not work.

Last edited 2010


Yue(Posted 2010) [#3]
see here:
EntityParent FakeCamara,Centro_Auto,1 ;<<<<<< GAME OUT
PositionEntity FakeCamara,0,1.5,-3,1

Repeat 
	
	
	
		
	
	PointEntity FakeCamara,Jeep1
	
	
	Camara_Libre()
	Repeat    
		
		elapsed = MilliSecs() - time   
		
		
		
	Until elapsed
	
	
	ticks = elapsed / period
	tween# = Float(elapsed Mod period) / Float(period)
	For k=1 To ticks
		time = time + period
		If k = ticks Then CaptureWorld
		
		
	Next
	
	
	
	
	
	
	
	
	
	
	
	
	If Calidad <> -1 UpdateShadows Camara1,tween
		
		
		
		pxRenderPhysic(60,0)		
		pxBodySetEntity(Jeep1,Px_Cuerpo_Jeep)
		pxWheelSetEntity(Llanta11, PxLlanta1, 1)
		pxWheelSetEntity(Llanta22, PxLlanta2, 1)
		pxWheelSetEntity(Llanta33, PxLlanta3, 1)
		pxWheelSetEntity(Llanta44, PxLlanta4, 1)
		
		
		pxWheelSetSteerAngle(PxLlanta1,Angulo_Llanta)
		pxWheelSetSteerAngle(PxLlanta2,Angulo_Llanta)
		
		
		
		CamaraFalsa()
		RenderWorld  tween
	
		Text_ (0,0,Motor,0,0,100)
		
		pxWheelSetMotorTorque(PxLlanta1, Motor)
		pxWheelSetMotorTorque(PxLlanta2, Motor)
		pxWheelSetMotorTorque(PxLlanta3, Motor)
		pxWheelSetMotorTorque(PxLlanta4, Motor)
		
		Flip Turbo
	
	
		Control_Auto()
			
	
	If KeyDown(1)
		Estado = True 
	ElseIf KeyDown(1) = False And Estado = True 
		Estado = False 
		Nivel = 0
		Eliminar_Nivel()
		FreeShadows()
		ClearWorld True,True,False
		pxDestroyWorld()
		
		Goto Menu_Inicial
		
	End If 
	
	
	
	
	
	
	If MouseDown(3)
		RotateEntity Centro_Auto,0,180,0
		
		
	End If 
	
	
  ;TurnEntity  Centro_Auto,0,1,0
		;If Y < 0 MoveEntity FakeCamara,-.5,0,0
		If KeyDown(208) pxBodyAddForce(Px_Cuerpo_Jeep,0,80,0,1)
			
	
Forever 



jfk EO-11110(Posted 2010) [#4]
Still not enough code. What are the functions doing etc. What kind of crash, a MAV? (memory access violation)

Maybe you should try to isolate the problem in a very small program without functions and libs.


Yue(Posted 2010) [#5]
Unexpected application in debug mode, without warnings or anything, yasha remember that told me about stack overflow.

Last edited 2010