Shooter

Blitz3D Forums/Blitz3D Programming/Shooter

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.

Dude, you did the same thing in this section of code:
	If MouseDown(1)
		bulletType.BulletType = New BulletType
		bulletType\mesh = CopyMesh(bulletMesh)
		RotateEntity BulletType\mesh,EntityPitch(player,1),EntityYaw(player,1),EntityRoll(player,1)
		PlaySound GunFire
		PositionEntity BulletType\Mesh,EntityX(player) - .1,EntityY(player) - .134,EntityZ(player) - .8
		EntityType BulletType\Mesh,3
	EndIf

You already used the variable named BulletType as the name of a TYPE. You can't use it again (even lowercase bulletType) as a type-instance-handle.

Change it to this:
	If MouseDown(1)
		thisbullet.BulletType = New BulletType
		thisbullet\mesh = CopyMesh(bulletMesh)
		RotateEntity thisBullet\mesh,EntityPitch(player,1),EntityYaw(player,1),EntityRoll(player,1)
		PlaySound GunFire
		PositionEntity thisBullet\Mesh,EntityX(player) - .1,EntityY(player) - .134,EntityZ(player) - .8
		EntityType thisbullet\Mesh,3
	EndIf