Scripting

Blitz3D Forums/Blitz3D Programming/Scripting

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.

A simple implementation would use collision shapes that executes a function/script upon collision. There are many ways to create collidable objects. You can use Blitz Collision, Meshes with Alpha set to 0, or Math Collision.

;Math Box Collision Example
If EntityX(player%)>=box_pos_x# And EntityX(player%)<=box_scale_x#
	If EntityY(player%)>=box_pos_y# And EntityY(player%)<=box_scale_y#
		If EntityZ(player%)>=box_pos_z# And EntityZ(player%)<=box_scale_z#
			box_collision%=True
		EndIf
	EndIf
EndIf
You can either hardcode the action or use a scripting sytem like BlitzScript3D.