MoveTo (Update: 2013/05/02)
[plugin] TouchWrap. The different between touchwrap and official touch plugin are
-Touchwrap will keep tracing position of cursor when mouse moving even if mouse click is not down.
plugin -- touchmouse
In pc, mouse plugin can be used, but touch can not. In pad, touch plugin can be used, but mouse can not.
If you want to make a game running on pc and pad, you may create double events for both mouse and touch.
Here is a mouse plugin extension that merging touch events from original touch plugin.
The events mapping list below.
mouse: On click: Left/Middle/Right + Clicked/Double-clicked
= touch:On touch start (touch has no key mapped from Left/Middle/Right)
mouse: On any click
= touch: On touch start
mouse: Mouse button is down: Left/Middle/Right
= touch: Is in touch
mouse: On button released: Left/Middle/Right
= touch: On touch end
mouse: On object clicked: Left/Middle/Right + Clicked/Double-clicked
= touch: On touched object
mouse: Cursor is over object
= touch: Is touching object
Using touchmouse plugin for supporting mouse and touch at a single event.
Thanks! I have tried them all and works perfectly. They are an amazing timesaver.
Yes, thanks for contributing. These will come in handy some day.
Set instance's position related to layer. Before is using absolute position which may be wrong when scrolling layer.
Sorry, my mistake.
Sorry again, I update cursor again. <img src="smileys/smiley26.gif" border="0" align="middle" />
Drag & drop has the same problem with cursor.
Now I use position related layer like in cursor plugin.
Thanks for these plugins..
Behavior plugin -- MoveTo (download)
Moving the sprite to the target position straightly from current position.
To assign target position, use action:Set target position.
You can assign acceleration or deceleration if need.
Develop games in your browser. Powerful, performant & highly capable.
awesome! A fantastic contribution.
Update of moveto behavior:
Special thanks to gonzdevour.
There is a bug about getting Touch.Y found by gonzdevour.
So I update touchmouse plugin
I am rather new and follow several tutor in
creating some basis games
Now I would love to make some for touch mobile device
BUT how do I use your plugin ?
Would you be kind to explain a little
.. where to install
.. how to use in C2
This tutorial is made by gonzdevour.
<img src="http://i1220.photobucket.com/albums/dd443/gonzdevour/HowtoUsePlugin600.jpg" border="0">
or see this for larger image.
Thanks a lot .. rexrainbow
I see :-)
I still have some trouble
my wish is to drag a sprite along the x-axis with TOUCH
hope you or someone can help me
I will try, maybe it need some days.