MoscowModder's Forum Posts

  • Yeah, I do that for the actual gameplay. The trouble is not how I will disable the mouse but how I will tell that it needs re-enabling.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In my game, I have several menus that can be navigated with either keyboard or mouse. You can move the menu cursor by pressing the directional keys to move and Enter to select, or moving the mouse and clicking on the chosen option.

    The trouble is, if the mouse cursor is sitting on top of a menu item, then the game will think you're trying to select it with the mouse, and if you press the arrow keys you'll just go right back to the one under the mouse.

    What I'd like to do to fix this is to somehow disable the mouse (like setting a flag on the menu cursor) when you press any key on the keyboard, and have the menu ignore it, but then re-enable the mouse as soon as the mouse cursor moves.

    The trouble is, there doesn't seem to be an "On mouse moved" event. How do I pull this off without it?

    You can try out the menus in the game (or just play the game, heh) here. One of the menus in question is on the title screen. Put your mouse over an item and try to move off of it using the arrow keys.

  • It's been a while since I last looked at this thread. Since then, I've added two more levels, cloud sync, and a ton of enhancements.

    Also, I've started a dev blog (which features as a changelog) detailing my work on the game, plans for the future, and of course the latest updates.

    I could really use some feedback to help me make the game feel more professional. Balancing, graphics/audio, polishing touches, etc.

    What do you think?

    PLAY HERE

  • : Thanks for the tip! Didn't know that existed. That's simpler than my previous fix.

  • During a level, I keep track of the time spent in that level as a seconds counter (every 1 second, increase counter by 1). After the level, I want to display the time spent as a minutes:seconds counter.

    This is what I'm doing:

    Text = floor(seconds/60) & ":" & seconds%60

    The problem is that a single-digit seconds value will display as one digit. Example: 1:3 instead of 1:03. How do I fix this?

    EDIT: Figured it out! Wasn't too hard, even.

    1. Set text to minutes and separator: floor(seconds/60) & ":"

    2. If seconds < 10 (seconds%60 < 10), append "0"

    3. Append seconds: seconds%60

  • I've been developing and lurking and posting for a while, but have never formally introduced myself it seems.

    Hello, World!

    I'm MoscowModder, and I make games. Ha ha, silly me - we all make games here. I have a few cool ideas for big games (all in different genres) that I'd like to make in Construct 2 (all in the same series for now), but my current project is a 'little' game I like to call Carnage in Space 2 (sequel to a game I made in a different engine). I like feedback, I like hearing ideas from folks, and I LOVE making pointless, flashy features in games. No wonder I haven't released very many so far (3 finished games in 5 years).

  • Does the player's pin to the PlayerMovement apply after the weapon's manual move to the player? What's the order in which events and behaviors are acted on?

  • Well, that felt a lot more painful than it needed to be, but I got it working! HUZZAH!

    If anyone feels like trying it out, you can do so at http://www.carnageinspace.com

    If anyone wants to make their own online save files, I'll freely provide snippets of the Construct and PHP code used to make it.

  • Ahh, I didn't see the LastData expression in there before.

    Does this plan sound feasible and doable, then?

  • I've considered using my website to store player's save files (basically "cloud saves") so they can pick up where they left off on another computer, or have multiple save files that they can switch between.

    In Construct 2, a player's entire save file is stored as a Hash Table (using a 3rd-party plugin) that can save/load to a JSON string. On my website, I can store/load a string to/from a flatfile (using player's name as filename).

    How would I bridge the two? Here's what I envision:

    1. When user starts game, they are prompted to create an online save or play locally.

    2. At the main menu, they can press a button to create an account (upload local save to web), or log in (download remote save).

    3. If user is logged in, they will automatically upload their save when it changes.

    Downloading:

    1. Game sends username and password to server

    2. Server sends back JSON file with valid data if correct login, or blank otherwise

    3. Game reads file and prompts for re-login (if invalid) or loads save (if valid)

    Uploading:

    1. Game sends username, password, and JSON to server

    2. Server saves file if valid, or rejects if invalid (does not respond to server)

    If a local save exists, game uses that to load/save. If registration (name/pass) also exists, game will upload to that.

    Game will only download from server when logging in (or changing accounts).

    Is this possible? How do I send messages between the game and server?

    I am familiar with PHP, JavaScript, etc, so I expect a web developer's perspective.

  • Yay, now I can type ridiculously fast and still hit things! Good job

    (I don't type quite so fast when I have to type those long Portugese words, though. Those are hard.)

  • : That's what I'm doing.

    Aphrodite: The player is placed by pinning him to a separate object that handles his platforming, so his position is not controlled by my 'code'.

  • Pin-to-type? Would this somehow be different from the existing Pin?

  • I hate to do this, but... bump?

    I still can't for the life of me figure out why setting an object's position to another every tick would make it lag behind the other.

  • Works like a charm. Thanks!