zatyka's Recent Forum Activity

  • Please don't take this personally, but it's very difficult to make sense of your description, and ever more so, the capx. It's a lot easier to provide assistance if the capx is concise, and your desired result is fully explained.

    I'm not sure exactly what you're goal is, but I think I may have deduced it. I'm guessing you want the player to hold the down arrow button to charge up the yellow bar, and if the the player presses the red button while the yellow bar is charged, Sprite 2 appear. You also want the bar to maintain its width for the duration of the animation, and then return to it's original width.

    Andreylin mentioned that you can trigger something to happen at the end of Sprite 2's animation, but that won't work in this case, because you don't really end Sprite 2's animation, you just set it to invisible after the animation has completed. Therefore, the quickest fix I can think of was to only have the yellow bar change width when the Sprite 2 is invisible.

    I hope this is what you were looking for.

  • I can see this topic becoming better suited for the �How Do I....?� forum, but here goes nothing. I'd rather not post the capx for a couple reason:

    • The engine is the basis for the project I'm currently working on and I'd rather not make it public at this time.
    • I'm not sure how useful it would be to someone unfamiliar with the different components making up the engine. There are quite a lot of things going on at once in the demo, and while the code is organized, it would take quite a while to decipher.

    However, I'd be happy to discuss specific components that make up the engine (or point-and-click adventure games in general), and perhaps whip up a tutorial or demo capx if appropriate. For example, here are a couple components of the engine:

    • Movement - The demo uses platform behavior, but only because the game is in the style of a 2D side scroller. For more traditional point-and-click adventure games, you'd use path finding in conjunction with other processes (like z-ordering of objects).
    • Zone Comparison - The level is broken out into different zones, with some zones overlapping others. Every time you click on an object, or use 2 objects together, a process compares the hero�s current zone(s), and and the target object�s zone(s). If they share a zone, an action can be executed.
    • Action Interface - The demo uses a pop-out icon interface to shows a set of actions contextual to the item selected, but a static action menu (e.g. Secret of monkey island/King�s Quest 5) is similar, and much easier to implement. When a user executes an action, a timeline is generated.
    • Timelines - Almost every time you execute an action in the demo, a timeline is created and populated with one or more pre-set function. Each function is executed in order, one-by-one, for one or more objects, usually the hero. For example, when you pick up an object, a timeline is created and populated with functions that move the hero to the object, adds the object to your inventory, destroys the object, and displays dialog.
    • Inventory - The inventory gives the player an interface for displaying, and performing actions on items acquired during gameplay. Also, using items in your inventory on other objects within the level.
    • GameClock - Definitely not a standard component for point-and-click adventure games, but useful for certain puzzles. For example, in the demo I posted, you can grow a plant if certain conditions are met, and a certain amount of time passes.
    • Player Choices - Though not part of the demo, giving the user a set of options to choose from is a staple of the point-and-click adventure game genre. It�s most commonly used when giving the player choice of dialog between the hero and NCPs.

    There are certainly other components of point-and-click adventure games, but the above components are some of the most important.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's a lot easier to explain with an example:

    Demo

    Capx (with annotations)

    I hope it helps.

  • I've been working up a 2-d (think side scroller) point and click game engine. Here's a test I uploaded a while back:

    Point and Click Demo

    Click anywhere to move.

    Click and hold the left mouse button over an object to select it, and release the mouse button when you're over an icon to select an action.

    Construct 2 is quite capable of point and click games, especially with the new path finding behavior.

  • As long as you're saving all the necessary data to something with a global scope (like a global variable, or an array), you should have no problem using that data across different layouts. I'd double check to make sure there aren't other factors affecting the information being displayed.

    If you're still having problems, post your capx.

  • What exactly is the desired result? Do you want the lasers to shoot straight, endlessly, until they run into an obstacle, or do you want a 1 to 1 relationship , where each laser aims for a specific switch?

  • To answer your question regarding mirroring, when you mirror a sprite, you're essentially settings it's width to negative. So if you have a sprite with a width of 25, and you set it to mirror, its width is -25. So in your example, your resizing back to un-mirrored dimensions.

  • Did you try comparing the text to see if it does not equal ""?

  • You need to pick the specific instances of the icon you'd like to destroy. One way would be to set an instance variable on the icons as they're being created in the loop, and when you're ready to destroy one of them, choose the icon with a specific value in its instance variable to destroy.

    However, I think there's a much more efficient way to do it using a global variable for lives, and running a function whenever the number of lives change.

    Demo

    Capx.

    I hope this helps.

  • I'm not exactly sure what you consider simple, but unless you're only going to have an inventory big enough for a couple items, you'll need to get comfortable using Arrays. There are some very helpful tutorials going over the basics of array in the tutorials sections of the site. I'd recommend you check them out.

    Here's an annotated demo. The inventory is stored in an array, so it will be saved between layouts.

    Demo

    Capx

    I hope this helps.

  • I would create a function to show the items in the array, and call it as needed. I'm not at my main computer, so I'll just wing it with the code. I'm assuming you're storing the inventory items in an array that is 4x6x1. If so, it would be something like this:

    On Function "Show Inventory"

          For Each InventoryArray XY

                Create Object IventoryItem

                Set InventoryItem Animation to InventoryArray.CurValue

                Set InventoryItem X position to (Whatever X you want the first inventory item to appear + InventoryArray.curX * InventoryItem.Width)

                Set InventoryItem Y position to (whatever Y you want the first inventory item to appear. + InventoryArray.curY * InventoryItem.Height)

  • Perfect. Thanks everyone!

zatyka's avatar

zatyka

Member since 11 Aug, 2012

Twitter
zatyka has 1 followers

Trophy Case

  • 12-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • x11
    Coach One of your tutorials has over 1,000 readers
  • RTFM Read the fabulous manual

Progress

15/44
How to earn trophies