I`m wondering how I can make the player lose a live when he get killed by a enemy. Heres the capx:
dropbox.com/s/sakwfsv3hwe7itz/AlexTheKidInTheMiracleWorldRemake2.capx
I tried with global and instant value, but nothing works.
Hope someone can help me out!
Develop games in your browser. Powerful, performant & highly capable.
First off, you don't want to reset your global variables unless it's game over.
Start off by setting your global variable LIVES = 3
Then when the hero gets hit, remove one from LIVES and update the text box.
After all three are gone, game over.
See this updated capx
https://www.dropbox.com/s/ouizqwd4kp87f24/alexkidd.capx
Thanks, this really helped :D I was struggling all day with this, before I decided to make the post. By the way, this is a little off-topic, but I`m also have a second problem. The player dont start on the texture-ground, but on the layout "floor".
Your Hero sprite is a 2 frame animation. The collision box on both frames doesn't match up, take a look at the collision box on frame 1.
That's your answer ;).
<img src="http://content.screencast.com/users/ArcadEd/folders/Jing/media/3771d9e8-c7d5-4be0-aaf7-759f2e6b454a/2013-05-29_1432.png" border="0" />
Aasmund ... mega embarassing.. I don't have a license yet, so I can't save it.
However; dl.dropboxusercontent.com/u/49149597/Aasmund.avi
I believe it has either:
-Something to do with the origin of ALL blocks (grass and solidjumpblock)
-Origin (base.. bottom of) the character...
Solutions:
-Try a new block from scratch
-New character sprite
I will do both of these in the next half hour.
ArcadEd WELL YOU WEREN'T THERE WHEN I WAS TYPING MY POSSIBLE ANSWER.
<img src="smileys/smiley9.gif" border="0" align="middle" />
If his doesn't work, check mine.
Sulli
Haha, I hate that!
ArcadEd <img src="smileys/smiley26.gif" border="0" align="middle" />
Ah, I never thought of the collision boxes <img src="smileys/smiley17.gif" border="0" align="middle" />
Again, you guys have helped me very much. Now I just need the enemy to flip around when he has hit the questionmark-box. I have re-made the texture myself in Photoshop by the way :)
Aasmund tag us in if you need a hand again, I'll try and help <img src="smileys/smiley1.gif" border="0" align="middle" />