Gumball's Forum Posts

  • The LocalStorage Object can save/load data with relative ease.

    (EDIT: WebStorage has been deprecated, and as such removed from my post.)

  • Why do you need it to be one large game, exactly?

    (Either way, you could make a new project with a ''selection'' layout, that then leads to the appropriate opening layout for each existing game.. You'd need to manually add said game to the project though.. Bit by bit.)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Interesting, I always figured global variables were global for that layout only (Although thinking back, the name should have been a dead giveaway.). Guess that would solve his problem.

    (And thank you for teaching me something new! )

  • I don't think Variables cross over to a new layout though? So he'd still need something to store those in to transfer them to his final layout.

  • An invisible scaling object that changes in size as needed on each intersection? I'm not sure if that'd work well, but it'd be my first attempt.

    Unless of course you've already tried that, then I'll go and feel dumb in a corner.

  • You could use some voodoo magic (*cough*Math*cough*) to calculate the current percentage of your max health, then scale the upper layer (content) of the bar to said percentage of its max width. Or, as said put a second background at the end of your bar, and increase that in size the more health someone loses.

    Note that you'll want two values for this to work, a MaxHealth value and a (Current)Health value so you can Mathematician your way to the desired result. And two sprites, of course. A separate background and content sprite for each bar.

  • You could probably make either an array and store values in there for each level (Assuming an array's data persists through layouts, I've never found anything that says it does or not?), or make a global object that's invisible that keeps track of the total score. At least those are the solutions I would use with my limited knowledge.

  • I do believe you may need to instantiate your events properly, from what you told us I gather you've cloned the object, but never changed the events to work for each specific instance, but rather have it affect all of them at once. Which is what Kyatric seems to be telling you. hence the request for a *.capx (File > Save As Single File) so he (or someone else) can see what you've done exactly, and point you in the right direction.

  • I recommend doing this outside of Construct 2. Using pure HTML you can just make images that are links so when a user clicks on an image go to game1/index.html, on the second image go to game2/index.html and so on. The index file is the file that is created when you export as HTML5 website. I never worked directly with HTML5 so I'm afraid I can't give you an example.

    Definitely the easiest way to do this, your directory structure would be as follows in this case:

    ./
    |- index.htm
    |- game1.png
    |- game2.png
    |- game3.png
    |- Game1
      |- index.htm
      |- (Any other data exported by construct)
    |- Game2
      |- index.htm
      |- (Any other data exported by construct)
    |- Game3
      |- index.htm
      |- (Any other data exported by construct)
    [/code:15zzbltd]
    And then have your first index file contain a bit of html with links to each game and a picture representing it. e.g.
    
    [code:15zzbltd]
    <center>
        <table>
            <tr>
                <td><a href="./Game1/index.htm"><img src="./game1.png" /></a></td>
                <td><a href="./Game2/index.htm"><img src="./game2.png" /></a></td>
                <td><a href="./Game3/index.htm"><img src="./game3.png" /></a></td>
        </table>
    </center>
    [/code:15zzbltd]
    
    You can then make it look as pretty or ugly as you wish.
  • Perhaps you could write a page that returns an image when requested? e.g. /image.aspx?id=1&size=1 where size could signify whether it should return the full image or a thumbnail. It'd require some work outside of the Construct UI, but it's a tool that can be re-used in the future for other projects as well. That way you don't need to make a thumbnail of every image yourself and when you expand you could just toss new images into the folder and the page handles all the logic for you.

  • it's not really a ''disable'' of sorts, since there does not appear to be an undo function by default, you could keep track of data entered in a variable on the OnChanged event, and when someone hits BackSpace or Delete revert the textbox to said variable?

    It's not pretty, but it might just work.

  • I would say a login screen would be a little out of reach when you're unable to get a global HUD to display, but I digress. I can at least help with your first problem! I have no experience with the websockets in Construct.

    To build a UI that tags along onto each Layout you'll want to set the object to be global, and possibly set their behaviour to Anchor to make sure they stick to the same place when the screen scrolls. The following tutorial should give you a decent idea of how to make a basic global UI: https://www.scirra.com/tutorials/594/bu ... terface-ui

    Of course, if you only wish to know how to make an object global (i.e. it traverses through every layout that comes AFTER the one it has been made on) the following image should help:

    That image comes from the object properties in the layout editor. (Courtesy of the aforementioned tutorial)

  • Howdy!

    I've recently picked up Construct again to fidget with it, despite owning it for a while I never really decided to -DO- anything with it at all.. And had figured that replicating the combat from Oracle of Ages/Seasons would be a fitting challenge to get started with a new system. (Bear in mind, while I have little experience with Construct itself I have dabbled in the logic of game creation for a while, I might not be an expert but I do have some experience.)

    The result is as follows: https://dl.dropboxusercontent.com/u/711 ... index.html

    (Arrow keys to move, Control to attack. Spin charge works. You can't die, but the enemies can)

    I've hit a bit of a wall (pun intended) though. the 8Directional movement Behaviour (using a 90 degree angle shift, not full rotation) does not rotate when the object is against a solid. And while I partially understand why it doesn't rotate (as it rotates, and doesn't just snap into an angle internally) I can't say it is the behaviour I want to see, as my animation depends on this angle.

    Is there a way to make it rotate when another side is against a wall, or am I better off adding custom movement behaviour and fidgeting with this to get it to work my way?