PixelRebirth's Recent Forum Activity

  • Families are also a good way to solve this. Eventually you won't be able to put everything that is supposed to have damage displayed into the same family though, or you just plain don't like to bother with families. Personally I'd probably prefer to simply pass parameteres of whatever is being damaged to the function. But you know, whatever works.

    The way you used a lot of globals there though confuses me a little to be honest. You use them to temporarily store the data of the current enemy? Of course I don't see the whole picture here, as there are only snippets of the event sheet, but I think you could be more efficient about it.

    The enemy being attacked is going to be picked anyway, why is there the need to temporarily store its stats in globals and calculate the actual damage from that? It seems like an unnecessary step.

  • Tulamide answered all questions perfectly. It was probably a bit shortsighted to make the example "hardcoded" with the 'BadGuy'-Sprite. I was mostly concerned with the method of displaying the numbers correctly.

    But yes, Tulamide said it all.

  • Oh, how unexpected. The MOD object was a pain in the ass to be frank, this should come in handy. Thank you so much R0J0hound!

  • So awesome once again Arsonide! Data Structures plugin will prove incredibly useful! My head is already spinning with ideas.

  • Okay, I decided to make this into another blog post. This one was particularly exhausting, I didn't realize there was so much to explain, haha.

    We Construct Blog - Forum rescue #004: Bitmap font damage

    I hope you'll be able to grasp the concept from this (cap files are included).

  • Actually, I don't get it . It looks complicated... Can you make a cap file with using my bitmap font please ? The MAX Damage is 999999 (6 digits).

    No worries, I'll make an example cap for you. Just be a little patient, this weekend seems to be a bit busy.

  • So your main problem is how to use your bitmap font in the game to display the actual damage? I suppose you might have heard of the SpriteFont plugin, which does a good job in many cases, but it sometimes also does crash I'm afraid.

    I would suggest you do it simply with events. Using some text expressions and a comparison string it's not that hard to get a custom bitmap font working (check this older thread).

    When you are dealing only with numbers, you could do it even simpler. Just iterate over the individual characters, and spawn the number sprite on the respective frame.

    Like that for example: DMG 135, taken apart to 1, 3, 5. Now you could just create three instances of the number sprite in order. One on frame 2, the second on frame 4 and the third on frame 6. Assuming you have your frames in order 0, 1, 2, 3, 4... which you should have of course. You have to add +1 cause frames aren't 0-based and start with the first frame on 1.

    I realize this probably sounds terribly theoretical. If needed I will cook up a proper example of what I mean when I have time later.

  • I made a tutorial-like blog post providing an example on how to create such "nests":

    We Construct Blog - Forum rescue #003: Respawn an enemy

    Hope that is helpful!

  • Why is there the restriction of having to use one layout only in the first place? I don't think anything is gained by this limitation.

    That said, I like the general idea of the competition. Like others I'm a bit on the fence with having to provide the source though.

  • Nice to see the few issues with r1 being fixed so fast. Thx guys!

  • I tired it and I really don't like it. I tired Door.Y-0.25*timedelta and it move super slow, like 0.25 every second. I had to do like Door.Y-100*timedelta. I'm not use to using big numbers. I really know nothing about timedelta because I never used it.

    0.25*Timedelta means it moves 0.25 pixels every second. Yes, that would be quite slow. And 100*Timedelta means that the object would move 100 pixels per second on that speed. It's just a matter of thinking in pixels per second when it comes to movement speed I guess.

    There's also a nice little example on the We Construct blog, which deals with TimeDelta to create a custom timer. Maybe that will help you understand. Also it's never the wrong idea to revisit the wiki article.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • A few things in your cap seem a little long-winded. It's best in my opinion to use the function object, define clear functions like "Open Door" and call them passing the according parameters. That way you'll end up with a very clean setup.

    To fix your cap quickly, you could just merge events 2 and 3 of the gimmicks sheet into one event that makes more sense. Basically it would look like this:

    <img src="http://dl.dropbox.com/u/2306601/switchy.png">

    Now there shouldn't be any more picking confusion and the right doors will open.

    Other than that I noticed you move your doors by simply adding +X to the position, without applying Timedelta. This will result in different door opening speed on different systems. You don't want that.

    Also instead of comparing the animation frame paired with a trigger once condition, you could just use the "On any animation finished" condition. In theory it's better in case there are multiple doors on the same frame at the same time. Don't forget to uncheck the loop property of the animations for this to work.

    A word of advice on a different matter: if you want people to look into your cap, try to get rid of custom plugins/effects if they're not necessary for the problem at hand. Or at the very least mention and link the custom plugins needed to open your cap.

PixelRebirth's avatar

PixelRebirth

Member since 26 Mar, 2008

Twitter
PixelRebirth has 1 followers

Trophy Case

  • 16-Year Club
  • Entrepreneur Sold something in the asset store
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Coach One of your tutorials has over 1,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

23/44
How to earn trophies