reset entity

Blitz3D Forums/Blitz3D Programming/reset entity

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

Thanx for your help, i think ive worked it out now. in the future i will probably opt for shadowing.
this is how it looks at the moment (xcuse the untidy code =)

	For b.bullet=Each bullet
			
		b\phase=b\phase+1: 
		If EntityCollided (b\h,c_level) Or EntityCollided (b\h,c_water) Or EntityCollided (b\h,c_PLAYER) Or EntityCollided (b\h,c_SHIP)
			
			For cc=1 To CountCollisions(b\h)
				entityhit=CollisionEntity( b\h,cc )			
				ct=GetEntityType( entityhit)
				.
				.
				.
				.
				. (other Collisions are in here)
				.
				.
				.
				.
				
				If ct=c_WATER
					If b\waterlatch=0
						x#=CollisionX(b\h,cc)
						y#=CollisionY(b\h,cc)
						z#=CollisionZ(b\h,cc)
						nx#=CollisionNX(b\h,cc)
						ny#=CollisionNY(b\h,cc)
						nz#=CollisionNZ(b\h,cc)
						createripple(-6,x,y,z,16,12.5,nx,ny,nz,4,1)
						b\waterlatch=1
						
						b\collisionreset=1
					EndIf
					
				EndIf 
			Next
		EndIf
		
		If b\phase>1 If b\noexplo=0 MoveEntity b\h,0,0,b\speed
		
		If b\collisionreset=1  
			PositionEntity b\h,x,y,z   :
			ResetEntity b\h   :
			b\collisionreset=0
		EndIf
		
		If b\noexplo>0 EntityAlpha b\h,Float(1-(b\phase*.02)) 
		If b\phase=>50 Then 
			FreeEntity  b\h
			Delete b
		EndIf
		
	Next