Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Controlling sprite move
theCrazyCrap last edited by
Hi! I am creating this platform game and part of my platform game is the movement of the character
I have already created a serquence of pictures that shows the character walking. What I wanted to do is when I clicked a button, the character will move...
Is it possible here at Qt?
Jake007 last edited by
Yes it is.
You can create an action ( "QAction":http://developer.qt.nokia.com/doc/qt-4.8/qaction.html), or you can inherit function keyPressEvent ( QKeyEvent * event ).
music24by7 last edited by
Doing a sprite animation is simple, Create an array with the list of your pictures.
You can have an timer which will advance this array.
Go through the "Qt Flying Bus example":http://developer.qt.nokia.com/wiki/Flying_Bus_Game
You can find the FrameSprite, which will give you the idea about how to achieve it.