Space Ape's Forum Posts

  • I know it's insanely late to post about this but I ran into the same question and couldn't find any simple solution... so I made one and thought it might help anyone who needs to do the same.

    I can whip up a capx if needed, but I think it'll be pretty simple to explain.

    For example, if the number you need to display is in a variable 'cash', follow these steps:

    1. Test to make sure the cash value is large enough

    Ex: if floor(cash/1000) => 1

    2. divide cash by 1000 and store the result in a separate variable like 'cash_thousands'

    Ex: cash_thousands = floor(cash/1000)

    3. subtract the thousands from the 'cash' value

    Ex: subtract (cash_thousands * 1000) from cash

    4. pad the remaining hundreds and ones and store in a text variable (we'll call it 'cash_display').

    Ex: set cash_display to cash_thousands & "," & zeropad(cash,3)

    Note: you can also just display the number variables directly with the comma, if needed.

    That's it. If you need bigger numbers, follow the same steps and make a cash_millions variable, dividing the original value by 1000000 and so on.

    If I goofed up, please call me on it... but I think this way is pretty simple.

    Thanks.

  • casief - I don't what you intend with the movie, but you can also try using the 'Browser' object to play the movie. If you add the movie file as a project file and call it with the Browser object, it should play in a new tab/window. If you're trying to play it in-game, rather than a new window, that won't help much! :)

  • ebrar - did you try turning on 'Point sampling' rather than 'Linear sampling' in the project properties? You might also want to see if 'Pixel Rounding' makes a difference. I noticed a massive improvement in the Retro look when using 'Pixel Rounding' and 'Point sampling'.

  • Just a quick note, it might be less burdensome on resources to use Tiled Backgrounds for a lot of the static stuff, particularly the road, trees, etc. You can do a lot with backgrounds and they require far less processing power.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • amariscal - If you haven't checked the firefox docs yet, here's the link about the manifest: https://developer.mozilla.org/en-US/docs/Apps/Manifest

    You need to make sure you follow their guidelines about setting up the mime/file types on whatever server you use; it's tricky, for sure.

    After wrestling with one app, I decided to go through clay.io; after uploading to them, you can use their service to go to the firefox marketplace. They do all the work for you. I'd recommend giving them a look, as they also expedite the exporting process to Facebook, Chrome, etc.

  • Hello folks!

    So I'm having a little boggle with listboxes.

    I added a listbox element to my program and use it to display some settings that the user can choose from (e.g. an options menu). This options menu, and the listboxes, appear when the user chooses, such as a press of the ESC key or a right-click of the mouse.

    The menu comes up and the listboxes work great, the first time, and then on subsequent uses the listboxes do not appear with the rest of the option menu. All other elements in the Options menu appear/re-appear when summoned.

    The options menu operates on a higher Layer than the rest of the program with its visibility toggled on/off as needed; the elements do not respond to input if the layer is not visible. Again, all works fine except the listboxes don't re-appear. I used Z-order to make sure they weren't getting buried, but no such luck.

    Any insights? Anyone have a similar experience?

  • ome6a1717

    You only want the mana timer to start if mana is less than maximum, correct?

    If mana < manamaximum, subtract 1 from mana timer

    When mana timer reaches 0, add 1 to mana, set mana timer back to 4

    Event Conditions: 1) Every X Seconds, 2) Mana < Manamaximum

    Actions: subtract 1 from mana timer

    -- Sub-Event: Mana timer <= 0

    -- Actions: add 1 to mana, reset mana timer

    I hope that's clear. :) Sometimes explaining isn't as easy as doing. If you're still having trouble, I can do up a quick capx for you.

  • I'll have to jump in and also add crashes.

    • Adding Keyboard to project
    • Adding Tiled Background
    • Adding Sprite
    • Creating a New Layer

    As soon as these actions were made, the program stopped working. It happened a lot but never with the same thing more than once. R120 seems very unstable all of a sudden.

    Windows 7 64-bit

  • Hey cesarzevil.

    I checked out the file you uploaded and it seems to work fine. I click on the orange box to play a level and it comes back to the main menu with a green box, 1 star, 2 stars, and 3 stars depending on what I clicked.

    Is there something I'm missing?

  • Alraune - Huh, it's strange that you can't get it to work. Maybe you can share a capx and we can see if there's something there?

  • Zizi - anytime, bro--that's what we're here for, right? If it helps you make better games, then it's worth it.

  • ome6a1717 - You could setup a variable and use it as a countdown instead.

    e.g. set the timer variable to 4, every x Seconds subtract 1, when the variable reaches 0, reset it to 4 (or whatever you need). Then perform any actions you need when the timer is 0.

  • Gillis - I'm wondering if you could, on a collision, simply disable the solid behavior as needed?

    On Collision with player > set solid false > Else > set Solid... ?

  • InvaderX - I'd probably use a countdown. Set the initial value as 11, then subtract 1 every x minutes a day costs in your game. When it hits 0, advance the month and reset the countdown.

  • I also tried using the file URL format and that didn't work, either. I'm not even sure if this functionality is supported in Construct!

    Anyone know if it's even possible to grab an image file (or any other file, like a JSON) from a sub-folder or the game directory?