DialgaBrite's Forum Posts

  • hi, I would like to report a problem with this plugin (not posting in "bugs" section since it's 3rd party).

    I have the following event:

    And when I pressed J, I got this:

    I would also like to point out that this behavior has absolutely no properties, or any possible event conditions, and only two actions. I would highly suggest improving it.

  • thanks for the help guys.

    I have really only been heavily using construct for a couple days (though I've been on the forum longer and purchased it and fiddled with it longer ago).

    sorry for the somewhat rude comment, I just don't like hearing "read the manual" and "use the search feature" over and over when I have already done so.

    for the record, using the search feature has given me 50+ pages of unrelated results. even when doing "search for all terms or exact query" (there doesn't seem to actually be an option for exact phrase that works).

  • Another avenue that is worth considering is to search the forums , especially the "HOW DO I " , chances are that more often than not someone has already asked your question and found a resolve .

    If you're talking about the next layout thing, I did that, and saw nothing. And I also found a way to do it, on my own, I just think it's extra work. Why do people keep saying the same things over and over and assume I am dumb? sorry, I'm just a little frustrated.

  • DialgaBrite, the bullet behavior and other movement behaviors already have set speed commands.... I suggest you read the manual before suggesting things c2 already obviously has. Some of your ideas are relevant but it sounds a bit like you haven't really looked into and tried some of the things in c2 that you think are deficient.

    The "set speed" action that is there is only for animation, isn't it? I have looked and I have looked at the manual. I really wish people would stop claiming I haven't looked at the manual when they are wrong.

    edit: nvm, I see "set speed" for bullets. I could have SWORN I looked at all the bullet actions and didn't see it. I am sorry!

    [quote:304rjcqx]

    Your next layout point. for example, doesn't work if you have a game with many adjacent rooms - next could mean one of 10 options, and so c2 doesn't handicap you to have to be limited to one way of managing your game.

    Isn't it obvious that this action would not replace the "goto layout" action? It's just another possibility, which at least two other programs have.

  • I respect what you guys are trying to say, but I still think it would be helpful.

    Also I have two more requests. "Circle" option in Sine behavior, and a "set speed" action for bullet behavior (possibly also for other movement behaviors if they don't have them.

    Also, did anyone see my "next layout" suggestion? It kinda got drowned in the talk about numbers and spritefonts.

  • Why not just use the sprite font? It does exactly what you're asking for and more.

    I looked at the sprite font... but I still find the other easier, because the sprite font is only one image and it needs to be carefully put together. And I don't need all the letters, only the numbers. I haven't really explored the sprite font too much, so my apologies if I seem ignorant. perhaps my problem is not knowing how to use it.

    Also I want to make another suggestion. An action for "go to next layout". this way I can have only one goal object with only one event to go to the next level. currently to do that I discovered this really dumb way to achieve it:

    • name all the layouts numbers so level one is named "1" , level 2 is named "2" etc.
    • make a global value that is a number and at start of layout, set it to int(layoutname)+1
    • when going to next layout, choose "go to layout by name" and put in str(globalvariable)

    If anyone knows an easier way of doing this I would really appreciate it. Also any help on using the spritefont object would be appreciated as well, whether it be links to tutorials, or just giving a general overview of it. bear in mind that reading tutorials doesn't always help me and sometimes I still can't get it even after reading them.

    edit: looked into sprite font some more, it really DOESN'T do what I want. the counter object basically let's me draw each digit in a program like macromedia fireworks, using that program's cool text effects, and then I can import each digit separately without having to worry about making the image exactly right, and without using letters.

    here are some screenshots of what I want:

  • If you set some sort of id variable to those Sprites like "tens" and "singles" and use something like.

    For tens Set frame => floor(Variable/10)
    For singles Set frame => Variable-(floor(Variable/10)*10)[/code:1jsf9jo1]
    There might be simpler formula, but that also seems to work ok. Variable is the number you want to show.
    
    Although I would only use this if you have some really wacky way of showing the number and otherwise I would use Sprite font.
    
    If that doesn't take you anywhere I would suggest posting on How do I forum. For example how do I make interface like in this image.
    
    Personally I don't know what something like interface object should do. Isn't it quite broad concept.
    

    I figured you'd say something along those lines, but really, having to set the tens, ones, hundreds, thousands, etc seperately is pretty dumb. Not to mention I would need a separate object for each digit. The counter object in MMF let's you add sprites of the digits, then it automatically shows ALL the digits based on the value of the counter. It even has automatic max and min values, so you don't have to program it not to breach them (doing so is easy, but its still a nice touch and one less extra step), and it even let's you add extra zeroes on the beginning to make it look cool. I still think this would be a really good addition to construct, given how much better it is than mmf in so many other ways.

    Also, the formula given for the tens would not work if there are more than 2 digits.

  • To import gif, right click on animation frames window and select import frames and select your gif file.

    Other people are saying that doesn't work, so I will have to try it myself.

    [quote:vsyusxxz]To show number on Sprite you could set the number images to frames, set the animation speed to 0 and just set animation frame from value. Note that you just need frames from 0-9.

    But that wouldn't easily handle numbers with multiple digits, would it?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • >

    > > The second issue is the way Every X seconds work, it does not reset between layout (it is every X seconds taking the start of the game for reference).

    > >

    > > I'll admit you are not the only one to think it should restart between layouts

    > >

    >

    > I agree, I think it should be reset between layouts. I also would like to see a global timer that starts at zero when the layout starts, and counts up. I also want it to be possible to set this timer (and have it count up from the position you set it to). The difference between this and the timer behavior is that it should keep rising even after the event for it goes off. so like you could do an event when it reaches two seconds, and then another event when it reaches 5 seconds, etc. People may be tired of hearing me mention MMF, but MMF has this feature.

    >

    There might be already a plugin in plugin section that does that. If not, just create a variable, to which you will add 1 every second, and then in game refer to it. Literally one variable and one event.

    As for Every X not resetting - it should, I agree. Makes no sense otherwise. Here's a quick fix, which I haven't tried ( cause I'm working on single layout ) but it might work: add condition to those events, something like varTime = True, and on end of layout set it to False, and to True at beginning of the next one. Alternatively use TImer behavior.

    The more I think about it, its kinda starting to seem to me like MMF's features are useless and redundant. Still a little helpful shortcut, but its not much though.

  • The second issue is the way Every X seconds work, it does not reset between layout (it is every X seconds taking the start of the game for reference).

    I'll admit you are not the only one to think it should restart between layouts

    I agree, I think it should be reset between layouts. I also would like to see a global timer that starts at zero when the layout starts, and counts up. I also want it to be possible to set this timer (and have it count up from the position you set it to). The difference between this and the timer behavior is that it should keep rising even after the event for it goes off. so like you could do an event when it reaches two seconds, and then another event when it reaches 5 seconds, etc. People may be tired of hearing me mention MMF, but MMF has this feature.

  • So the frame and health ratios are the same so:

    Health/maxHealth = frame/28

    Solving for frame:

    Frame = Health*28/maxHealth

    Next we need to round it to a whole number, and since we want frame 0 to be used only if the health is 0 we will use ceil() to round up.

    So the formula is:

    Frame = ceil(Health*28/maxHealth)

    I figured it out on my own, but thanks anyway! It seems like the majority of the people here are nice! That's another newbie problem solved! Wish me luck as I move along with my game, I might post more questions along the way!

  • Okay I have been thinking really hard about this but it's making my brain explode and it is driving me nuts. I want to have a boss with a megaman health bar. the bar is a sprite with 29 frames, frame 0 is an empty bar so a full bar is frame 28 with 28 "mini bars" in it. I want the boss to be allowed to have any amount of maximum health I ever choose at any given time (it will be a set number chosen by me for each boss, but perhaps different for different bosses, however the max health of a boss won't change during the game), hundreds of points even, possibly thousands, and I want each "mini bar" to represent 1/28 of the boss' health, rounded up to the nearest possibility (so if it has only 1 or 2 health out of a gazillion, it will show frame 1). What formula would I need to set the bar's frame number? I have been thinking about this round and round and I just can't come up with it. I am sure it's simple once thought of, so could somebody please help me? Most Megaman games seem to do one hit point per mini bar, or out of always 100 health, so I don't think many of those examples out there would help, even if they are made in MMF or Game Maker (if they did what I was describing then they would indeed give me the answer).

    edit: I figured it out. It's ceil(currenthealth/maxhealth*28).

    I actually had explored this before, but it was with the width of a sprite, rather than the frame number of an animation, so I kinda got confused. sorry if this topic caused any trouble!

  • Btw, animated gifs can be imported without any extra work to some extent. Simply drag a gif from the windows explorer to the C2 layout. It appears as a new sprite with all the animation frames as an animation.

    I understand this won't be as helpful as it could be though as it puts all the frames into a new sprite and you can't copy and paste all the frames at once from one object to another, but maybe it will save you some work on the initial import.

    That's nice to know, though as you said, it could use improvement.

  • It has to do with how events work.

    Event 8 will be tested every tick and will execute each time it is true.

    So since you're changing the value of time only once every 0.01 second that renders the event 8 true twice in a row, hence playing twice the sound.

    To correct it add a system condition "Trigger once while true".

    It's about the same for event 9, but you may have to split it into two events to have the second shoot also happening.

    Finally you might want to also look into the "Timer" behavior.

    Also a note for the next time you ask for help it might be easier to provide your capx rather than a video of the issue, since it allows us to look directly in the code and potentially provide a corrected capx back. Attach it to your post.

    Thanks so much, it appears to be working right now! I am really glad it was a simple fix. But without your help I probably would not have thought of it.

    The reason I posted a video was because I thought it would be helpful to SEE the bug, since it doesn't always happen very often when I play the game. I thought between that and the screenshots it would be enough. And since you were able to help me, it seems like it was.

  • Okay so basically I want it to pick the enemies (bulbasaurs) that are on screen AND have instance variable "time" less than 0, then out of those, pick a random one, and set its "time" to 100. When "time" reaches 99, play it's attacking sound. When "time" reaches 25, shoot at the player, and shoot again when "time" reaches 13. time's initial value is negative and it should be negative if the enemy isn't shooting or wasn't picked. However as you can see in the video here, sometimes they play the attacking sound twice overlapping, and shoot two bullets at the exact same time. How can I fix this?

    The reason I am using families is because say if there's two different species of pokemon on the screen, I want a random one of any of them to set "time" to 100, but depending on the enemy, I want it to make a different sound and/or shoot a different bullet.