Instead of setting y to 0, set it to 'self.y - self.Width * 2'.
I'd say you're doing the set text part right. Most likely the scores are 0 because they aren't being set properly or are being reset somewhere.
You shouldn't have both physics and platform behaviors on your player. Use one or the other.
When you mirror or flip a sprite it's angle doesn't change, just it's appearance. If your character is facing right with an angle of 0, then when you mirror it, he appears facing left but the angle is still 0. So you need to take that into account when setting the angle of the bullets.
Put in a 'System: Trigger Once' into event 4 so it only happens one time when ammo = 0. And then you can have 'System: Set testgunammo to 5' right after the 'wait 2 seconds'. And get rid of the testgunammomoreloadtime stuff.
<img src="https://dl.dropbox.com/u/8367729/construct/pics/reload.png" border="0" />
Develop games in your browser. Powerful, performant & highly capable.
You can use the 'Mouse: Set cursor from sprite' action to replace the cursor with your aim sprite.
Did you export your project and select 'scirra arcade' in the export options?
Leave the 'html' though! > <html>
Leave the 'html' though!
> <html>
Ha... yeah <img src="smileys/smiley26.gif" border="0" align="middle" />
The game itself is stored so you can play offline and don't have to re-download it when you visit the site unless it has been updated.
I think you can just delete the second line in index.html if you really don't want it to:
<html manifest="offline.appcache">
Here's what I came up with. It looks unnecessarily complicated haha.
Local text [b]ammoString[/b] = "" System: Set [b]ammoString[/b] to [i]Sprite.ammo1 > 0 ? ammoString & "1" : ammoString[/i] System: Set [b]ammoString[/b] to [i]Sprite.ammo2 > 0 ? ammoString & "2" : ammoString[/i] System: Set [b]ammoString[/b] to [i]Sprite.ammo3 > 0 ? ammoString & "3" : ammoString[/i] System: Set [b]ammoString[/b] to [i]Sprite.ammo4 > 0 ? ammoString & "4" : ammoString[/i] System: Set [b]randomNumber[/b] to [i]int(mid(ammoString, floor(random(len(ammoString))), 1))[/i]
Basically create a string with the available ammos eg. "134" and then choose a random character from that string.
randomAmmo.capx (r101)
Events 5,6,7 should be subevents of 4. Or alternatively, you could add 'System: Trigger once' to events 5,6,7.
http://www.scirra.com/forum/convert-milliseconds-to_topic54801.html
http://www.scirra.com/forum/highscore_topic52768.html
Member since 17 Apr, 2012