After a sleepless night, tons of cigarettes and a lot of frustrating moments I was able to make the Collition detection plugin.
I have made this plugin for puzzlegames like the slider puzzles where you have to move out a tile from box.
The plugin is easy to handle, but it have some limitations at the moment:
- The first hotspot you set, the small site of the hotspot sets the size of the movement.
- There are limitations for the hotspot sizes and coordinates:
the small site of the hotspots has to be dividable by 2 and the long site of the hotspot has to be a multible of the short site.
For example:
If you have a lenght of 50px for the short site, the longer site must have a size of 100(*2) or 150(*3) or certainly 50 (*1)
If you have a lenght of 6px for the short site, the longer site must have a size of 12, or 18, or 6 ....
-The hotspot coordinates of top and left have to be dividable by the short site of the hotspots
This sounds a bit difficult, but as when you run the demo for this plugin you'll see what I mean and you'll see that it's easy to handle.
If you have placed your hotspots well, just activate the plugin on each hotspot and select the allowed movements.
Zhe zip file includes the plugins and a projectfolder with the demogame http://wuttiggames.com/downloads/collitiondetection4.zip
I hope this plugin is helpful for your game creations and I would be glad to see some minigames with this plugin!
Oh, please note: If you have activated the plugin in a hotspot, it detects collitions to all hotspots in the frame!
Have fun
greetings juhuwoorps