still not working properly... odd..
here's my whole tenemy...
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