How to create a cutscene?

Blitz3D Forums/Blitz3D Beginners Area/How to create a cutscene?

Starting the cutscene should be triggered by your collision. Rob Farley's suggestion is pretty good. When you collide, just look for the entity you collided with. When it matches what you want, then do your Function or Subroutine to accomplish the cut scene.

If you have a hundred trees and want the cutscene to trigger when you collide with ANY of them, then maybe use a Type and the For...Each loop.

Try this:
const wall=1, tree=2, house=3 ;etc
Type entity    ;a type to tell us what entity category we're looking at 
	Field entity
	Field kind    ;wall, tree, door, fountian, etc
End Type


When you set up your objects in your game, create a new instance of the type:
myentity.entity=new entity

Then, when you put in a tree, do something like:
myentity\kind = tree ;using previously defined constant


When collision occurs (as per Rob Farley), do a For..Each loop:
For myentity.entity = Each entity
  If myentity\entity=pickedentity ;if list entity is same as picked/collided entity
If e\kind = tree;if entity type is a tree
					f
				EndIf
			Next