If you have a question about how to use the boilerplate, please post it here.
Yes they are scaled using a CSS transform, and you can adjust the scaling factor. High resolution art should be fine, and I’m happy to help you get it working.
Nice work, glad you got it working! The
renderStats function must be called every time you update the stats.
Unreleated question but do you have hints/tips on how to get damage numbers to appear on screen like shown in Asterogue?
Yes what you can do is create a new div on the same position, similar to the way the ghost is created.
You should make sure you have a blank tile in the tilemap and assign it to the space character like “ “. Then you can create the empty sprite and put a number inside it:
const number = createJuiceSprite([p._x, p._y], " ", "float-up"); number.innerHTML = "23";
That should create a number 23 which floats up and then disappears.
Hey, I think this is happening because you are pushing an array in there not the actual object.
Removing the square brackets will just push the one monster into the monsters array.
Thank you so much for taking the time to look over my mess. Your solution fixed it right up and I am waist deep in alien spawns now! Thank you for all your help and patience.
Hi Scott. Can you please tell me more about the hit points bug? What are you seeing versus what you expect? Please feel free to share your code.
In terms of updates, any up.date will be available to you. You’re entitled to all future updates. I will post here next time I release an update.
The hit points are not registering. The do not change when a monster hits me. I love your proggie and I really do wish I had an updated version. I see one on itch.io but do I have to buy it right after I just bought the first one???
You'll need to call the renderStats() function whenever you want to update the stats displayed in the stats box at the bottom of the game screen. The template has a line under "Player" section that calls the renderStats(); function when a coin is moved on by the player character. To update the hitpoint stat during combat you'll need to add renderStats(); somewhere in your "Combat" section, like after an attack. You can also add it near the end of the "Player" section when the player moves to update every time the player takes a step.
Please see MisterAtompunk’s reply about rendering the stat updates. You do not have to buy any update. All the updates come with the original purchase.
Hello Scott_Bro_1, and sorry for the slow reply. There is some example code in the other questions on this board that you can follow. Basically you have to change
Game.monster to be
. Then add new monsters to that array like in this example: