CP - Alien Breed Remake - 3

Miscellaneous Forums/Blitz Showcase/CP - Alien Breed Remake - 3

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.

Updated the alien animation code (so when we get some frames) to work - also makes the huggers point in the right direction now. Update the following:

Add the following field to the Alien Type:
Field frameTotal

Alien.bb - Update_Aliens:
		; animation frame control
		If move
			al\fpause = (al\fpause+1) Mod 5
			If al\fpause = 0 Then 
				al\frame = (al\frame+1) Mod al\frameTotal
			End If	
		EndIf


and update Alien.bb - Spawn_Alien:
	al\kind = kind
	Select kind
		Case 0: ; standard alien
			al\radius=20
			al\offset=32
			al\frameTotal = 1
		Case 1: ; face hugger
			al\radius=20
			al\offset=16
			al\frameTotal = 2
	End Select	


To get the hugger animating, I rotated each of the second frames 2 degrees - looked pretty good.