360 shooter.... scrolling background

BlitzMax Forums/BlitzMax Beginners Area/360 shooter.... scrolling background

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

still not working properly... odd..

here's my whole tenemy...

Type TEnemy
	Field x:Float,y:Float
	Field dx:Float,dy:Float
	Field angle:Int
	Field shoottimer:Int
	
	
	Const SPEED:Int = 15
	Method Create:TEnemy()
		ListAddLast(EnemyList,Self)
		x = 50
		y = 50
	End Method
	
	Method Update()
		DrawText PointsToDistance(x,y,400,300),0,20
		If PointsToDistance(x,y,400,300) >= 100
			angle = PointsToAngle(x,y,400,300)+90
			dx = AngleToDX(angle)*SPEED
			dy = AngleToDY(angle)*SPEED
		Else
			angle:+1
			dx:+AngleToDX(angle) * 5
			dy:+AngleToDY(angle) * 5
		End If
		
		x:+dx
		y:+dy
		
		x:+ -pdx
		y:+ -pdy
			
		If shoottimer > 20
			PlaySound shoot_sound
			Local bul:TBullet = New TBullet.Create(x,y,angle)
			shoottimer = 0
		End If
	
		SetRotation angle
		DrawImage player_img,x,y
		SetRotation 0
		
		shoottimer:+1
	End Method

End Type