Catch Egg contains only a few interactive features, which makes it a very good sample to study as you begin developing with playmaker.
Download
You will need to download first the c# game examples
You can download the package here
Basically, it took me 35 minute in total to port the scripted scene to Playmaker. The scene has no script and works with the standard set of actions shipped with playmaker, no custom actions created :)
While I create the explanations on each Fsm, please post on the playmaker forum if you have questions about this scene.
Explanations
Features:
- simple translation of gameObject with limits to move the bucket left and right
- simple collider management for egg caught in bucket and falling on the ground
- simple spawning system for the eggs
- simple gui interface
Scene Set up:
The scene set up it very simple:
I made a specificy egg prefab for two reasons:
- The EggPrefab has a a child which is the actual egg, it's not really needed and add a level of complexity not required when deleting eggs ( caus you would need to delete the parent of the egg, not the egg itself, else you would get leaks and EggPrefab stacking up and never getting deleted)
- I had to remove the egg script for the purpose of this playmaker port, you'll notice that now the eggprefab is totally free from any script of playmaker component, the egg doesn't need to do anything, but just act as a physics object falling.
The bucket itself is very simple, with a mesh collider to collide wit the egg, and a trigger plane inside the bucket to detect eggs falling inside the bucket.
Fsm descriptions:
We only have 5 Fsm in there. Each one is explained and detailed below ( listed by GameObjects followed by the fsm name):
- bucket : User Input
- EggCollider : egg collider
- game gui : gui
- Plane : ground collider
- SpawnObject : Egg Spawner
Credits:
Thanks to Mike Hergaarden (M2H), the one behind these great game samples.