Zoltar's Recent Forum Activity

  • How do I make an object to appear for x seconds after a button press and when the x seconds ends the object disappears ?

  • I've made a little test with a new project:

    [attachment=0:2dknwkpw][/attachment:2dknwkpw]

    the "inc" variable should stop at 9 but it continues to be incremented by 1.

    What's wrong here ?

  • Yep, the same question by me, this is where i'm stuck right now.

    How the flow of sub-event goes inside a loop ?

    [attachment=0:344v56br][/attachment:344v56br]

    This example isn't working, index just keeps increasing by 1 endlessly

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Does Construct 2 support If statements inside Loops ?

    How do I implement it ?

    Please give an example, thanks in advance.

  • I have in my game a weapons store and a player inventory like this:

    Weapons Store:

    Weapon image (sprite)

    " "

    " "

    " "

    and etc.

    Player Inventory:

    Empty cell (sprite)

    " "

    " "

    " "

    and etc.

    Purchase Button (sprite)

    When the player chooses one of the weapons in the weapons store, then another sprite object

    appears on top of the weapon's raw for showing the chosen object (an empty rectangle sprite object).

    When the player clicks the "Purchase" button, I would like the chosen weapon sprite object to appear

    in the parallel player inventory's empty cell.

    Is there any way to refer to the weapon's sprite object through the location of the focus on the chosen weapon to purchase ?

    The only way I see right now is by using the following event (long and cumbersome):

    Event: WeaponFocus (sprite image name) y = 200 Action: WeaponName (sprite) Set position to Cell1 (sprite image name)

    Event: WeaponFocus (sprite image name) y = 230 Action: WeaponName (sprite) Set position to Cell2 (sprite image name)

    Event: WeaponFocus (sprite image name) y = 260 Action: WeaponName (sprite) Set position to Cell3 (sprite image name)

    " "

    " "

    " "

    and etc.

    So if I have for example 40 raws of weapons in the store would I have to add 40 event lines instead of referring to

    the weapon sprite image name automatically by a single type of event ?

  • 1. What are the benefits of using a sprite sheet vs drawing my sprites inside construct 2, since my game uses

    some primitive shapes like rectangles, circles, squares and etc. ?

    2. When should I use one sprite sheet for all the game sprites and when should I use several sprite sheets ?

    Thanks.

  • In my game I have a weapons store with 15 types of weapons (maybe more in the future).

    I want to use a dynamic array for the player: say he buys a weapon for the first time the array size is 1, so the

    array size increases according to each weapon he buys and also the array size decrements for each weapon

    the player ends it's stock.

    So my question is if the usage of such a dynamic array improves game performance or should I stick with a fixed array size ?

  • Hi,

    Is there any difference, regarding memory, between copying or cloning a sprite object ?

    If I have a static sprite object that I need some copies of it should I copy or clone it ?

    Thanks.

  • Thanks Korbaach.

    I've done it a little different with the same approach.

    The screenshot is for others who might stumble across the same issue:

    [attachment=0:khuv59gv][/attachment:khuv59gv]

    But still I think that something like this should be a default implementation in the software:

    A sprite image in a new layer which covers another layer with touch buttons shouldn't be transparent

    to any touch in the same buttons position unless you specify it in code that the layer is invisible...

  • I provided an example.capx file.

    When you run the project in the browser try to click with the mouse in the same spots on screen

    where the buttons are located in the layer below and you will see a text sentence appear in response to any touch

    in Layer 2 which is not logical.

    The background sprite in Layer 2 should be solid.

    Why the background sprite in Layer 2 responds to the touch buttons ?

  • I have layer1 with some touch buttons on it.

    Layer2 is another sprite screen which covers layer1.

    How do I stop the touch buttons to react underneath layer2's screen ?

    I already tried to make the background sprite in layer2 solid, but it didn't work.

  • I have in my game 2 sprite objects and 2 sprite buttons: left arrow sprite and right arrow sprite to control these objects visibility:

    Left arrow click: object1 = visible, object2 = invisible

    Right arrow click: object1 = invisible, object2 = visible

    In the object properties, they are set to visible but for some reason the button clicks wan't turn the visible one's to invisible

    so I tried the same with opacity and now everything works like it should.

    1. Is there any issue with objects visibility in construct 2 ?

    2. What's the difference between using visible/invisible and opacity: 100% / opacity: 0% because the opacity option worked

    for me like I wanted and I can't figure out why ?

Zoltar's avatar

Zoltar

Member since 7 Oct, 2014

None one is following Zoltar yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies