MrMiller's Forum Posts

  • You should get to know private and globals really well.

    They're essential, really, and easy once you've used them once or twice.

    Well, to allude to my earlier post, I know how to do a Global variable as that's how I created my timer. But I'm curious about an alternative because of something I did in the past. In a test I did a few months ago, I was able to set up events to where when I pressed A and B at the same time it would jump to a new layout without using a global variable. So I thought the same type of concept might work for double-pressing a single button, and figured maybe I was just missing something to make it work this tme. But if that's not possible in this specific instance then I have no problem just sticking with a Global variable.

    Here is what my events look like without the double-button press code present:

    <img src="http://farm5.static.flickr.com/4010/4669662881_b9f1daba2c_b.jpg">

    When I click A sprite 23 shakes infinitely, when I click B sprite 23 stops shaking and sprite 24 starts shaking infinitely. This is to identify that the user has chosen the item. Neither sprite is to be destroyed.

    The double button press would be to select the item that was chosen.

  • Thanks for the info, newt!

    Luckily for me, I just learned how Construct does Global Variables 3 nights ago thanks to a help question someone posted about fixing a timer. It just so happened that I needed to create a timer, so by seeing how he wrote the code I was able to take it and reconfigure it into what I wanted (code examples and .caps are golden).

    But I wonder, is there a way to activate an event action on a second button press of the same button without using a Global variable? I only need this action to activate in one screen. You press B and the item shakes infinitely letting you know you've selected it, then you press B again and it jumps to the new layout... or at least that's what I was trying to make it do through events. The shaking part I have, the other part is where the trouble is.

  • I'm using the XBOX 360 controller object. I have a setup like this:

    *When I press the 'B' button, an image shakes.

    What I want to do is set it so that when I press the 'B' button again it activates an event action (like jumping to a new layout).

    I know how to set an event action to make it jump to a new layout under normal circumstances, I just can't seem to figure out how to make it work on the second button press... right now, it jumps to the new layout on the first press.

    Do you know what I could be overlooking?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So I've come to a situation where it appears that the size of certain graphic objects is causing some pausing between layouts. For example:

    Layout 1: normal image sizes, not very large, runs smooth

    going to...

    Layout 2: has larger image sizes and there is a pause/delay between the animated object in layout 2 showing visible, and the object beginning its animation sequence.

    I haven't run this as an .exe, but I can see in debug that it's a matter of the new layout object taking too long to load.

  • I've had some trouble with the AVI object myself. I wish I could rid of that timeline bar. Honestly, that's the only real issue I have with it.

    I echo Lavawaves question about making a Python video, or any type of alternative way to post video in Construct where I can do it without the timeline bar showing. I could always break the video down into frames and then also try to capture mid-frames, but that takes a long time and the quality is never the same as the actual video.

  • Okay, I found that it was made in .84. I wonder why when you download a second version of Construct, the first version disappears from your computer's program uninstall list? Is that normal? I've been using .62, but that disappeared from the list and only .84 shows. However, .62 is still on my hard drive and it still works. I hope it's nothing to worry about, it doesn't seem like a big deal as long as I can still access, use, save, and export to .exe with .62.

    Anyway, I don't know if you've been reading any of the post since you posted, but your example was great. What I needed to do is make it zoom automatically as the layout starts. So I took your code, reconfigured it and came up with this:

    1 Start of layout

    2 Every 50 milliseconds - ZoomX + 50 * TimeDelta, ZoomY + 50 * TimeDelta

    It works perfectly. Thanks again!

  • Thanks for the example, Citnarf, but I'm unable to open it.

    Could you tell me which version you used to create it?

  • I know how to make the display zoom, but I haven't been able to make the display zoom in slowly.

    I've tried setting it to move in every so many milliseconds, but instead it just goes to the final zoom position immediately when the layout starts.

    Any tips?

  • Whoa there guys, let's take a deeeeep breath

    Let me clear up a few things:

    1. I know what a global variable is, I just didn't know how to do it in Construct.

    2. I've programmed in Visual Basic and DarkBasic. I wouldn't call myself an expert by any stretch though. Programming in a language I'd say is far more difficult and time-consuming than using these types of programs. But that's why these programs are great, because it cuts down on that.

    3. The Time line object is okay for what I need. It doesn't have to be accurate to the millisecond because the timer I'm using is just a visual representation of an action happening in another layout. I wanted to know about the layout jumping for future reference but it's not applicable to my game now.

    4. My game is 90% done. It's a simple small game. I had to learn most of what I needed to do on my own which is perfectly fine, but some things I would've rather had a manual for. It's not a matter of wanting an easy way out or something, after all I've programmed in real languages and that can be really hard, so I'm not an easy-way-out guy. I just don't think manuals should even be looked at as easy way's out. Manuals are written for a reason; so that people can learn how to do something. Sure, you can always learn on your own, but normally when you do that you tend to not be as fundamentally sound as someone who learned "by the book" so to speak. Of course the upside may be that you may wind up more creative than the by-the-book guy and that can be a big plus, but that's another story.

  • I don't understand Global variables or how to use them and when to use them. So until there is a tutorial I'm going to use the Timeline Object.

    I'll depart from my original intent and just draw up an animated timer and set it to run by frame, and then set the actual time count in the background in miliseconds using the Timeline object. I'm able to link the end of the timeline to an event like jumping to another layout, etc. I've already tested it and it works.

    As a note, I'm finding the time-keeping accuracy to be a bit sluggish though. If I select 5,000ms (5 seconds) it actually takes about 6 seconds or a bit more (6.5 seconds?) for the linked event to trigger. I just find that the countdown is not consistently accurate.

  • I tried to download this using .84 and it still gave the error

    Do you have an example using .62?

  • I'm sorry, I don't quite understand what you're saying exactly.

    I have found how to make the text change, but I haven't figured out how to make it count down to 0-zero from a number like 25, without writing a very huge mount of lines with each separated by 1000 milliseconds.

    I was going to draw a graphic timer that counts down visually each second and then connect it to an event, but I'd rather make it text because a graphic one doesn't fit my game style.

  • Lots of platform games have a visual clock that counts down to zero, and the player has to reach a certain point or clear the board before it turns to zero causing the player to die.

    How do you create a visual timer that counts from any number you choose, down to zero... and then connect it to an event like:

    Number is zero = go to next layout

    I've searched the forum but can't find this information.

  • Guys, c'mon! This is THEE most important need in all of Construct!

    Now, after I finish this second case of beer I'll tell you more...

  • ^^^ Kicking more ass? I think so