type stuff

Blitz3D Forums/Blitz3D Programming/type stuff

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.

ShatteredReality,

I mean destroy as in remove it from update.

If your using different kinds of enemies but they use a common set of properties then you can add a property like
enemy\kind% or enemy\typeid%
to differentiate between them. I would keep the
enemy\id%
independent as you may need to track a certain number of a specific kind enemy.

Function enemyUpdate()
	For this.enemy=Each enemy
		Select this\typeid%
			Case 1 ;enemyBoss
				;do stuff
			Case 2 ;enemyMidBoss
				;do stuff
			Case 3 ;enemyHinchman
				;do stuff
		End Select
	Next
End Function