tarek2's Recent Forum Activity

  • Here is one way of doing it:

    https://www.dropbox.com/scl/fi/r2ozshdnt2r4z1azd9wtc/Light-Up-Akari2.c3p?rlkey=gvjci0nhgzz211px3hkkeqarz&dl=0

    I hope I didn't miss any edge cases, as normally you need more time to think about all possibilities, though it seems to work fine for me.

  • Yes, it's not such an easy task (to count the light, I made a variable for the family and if the light intersects with each other, but there are no lanterns, but the removal is simple, but if the light falls on someone else's lantern, that's the whole problem

    Yep, I get the whole picture now. I thought it just needed to set the bulbs to red as I never played this game.

    Bu is ok I have some ideas.

    Nice puzzle to solve :)

  • probably the main problem remains the moment when, in case of an error (two bulbs shine at each other), I remove one, and with it the light that should have remained from the first bulb disappears.

    Hoh wait, you want to also remove the lights?

    That complicates quite a lot the logic

    Your first request of just setting the error lights to red is easy but removing the lights feature needs more thinking as it can get very complicated because it could be multiple sources reflecting the same tiles so you have to keep track of how many tiles are reflecting each bulb lol.

    This is gonna be a good brain cracker.

  • Yes, that's right

    I will have a look

  • > Here is an example:

    >

    > https://www.dropbox.com/scl/fi/3m29s7pco3rfd9bzguvyh/Coloring-Cells1.c3p?rlkey=8eu6iyqnivvw8qh8eoqm9fszz&dl=0

    Good afternoon, I am very ashamed that I have to write again in the hope of getting help, but...

    I'm trying to implement the mechanics of the Japanese Akari puzzle (Light Up), but I'm stuck. If you have the time/opportunity/desire to help again, I would be very grateful. I managed to add: installing another flashlight and saving the light when deleted, but I can't implement: install a marker, install another flashlight on the cage with the light (so that they would be highlighted as an error). You can get acquainted with the implemented game here: https://www.puzzle-light-up.com/ . and here is a link to the source code that I tried to make based on yours https://www.dropbox.com/scl/fi/ufvyr01ii4k28t3l2xcxm/Akari.c3p?rlkey=586oy8z3q98fklcfwjo1junfw&st=o6i6md41&dl=0

    Anyway, thanks for the help you've already provided.

    I'm not familiar with this game, so not sure if I understood your question correctly:

    After I tested the game from your link it seems that you are referring to the Red Error light bulbs?

    Example:

    It looks like when you put another bulb in a tile that is lighted up it will mark all the light bulbs that are on the same (Row & Column) in red as an error.

    Is that what you are referring to?

  • There are different ways to do it, you just need to keep testing and see which one you like the most.

    Here some ideas:

    1-Create on the editor a Popup Panel and add all the tower animation frames available to the panel and place them in the right positions.
    
    2-Add also a Button to Close the panel
    
    3-(Create a Hierarchy between the frames + Close Button) and the Panel and make the panel as parent. And then on the "Tower frame Hierarchy settings", you need to tick:
    Transform (X & Y)
    Transform (Width & Height)
    
    Do the same for the close button
    
    
    4-Add to the panel the tween behaviour
    
    5-Add a Global variable "UID"
    
    6-On Tile clicked: 
    --------- Set "UID" to Tile.UID
    --------- Set the panel scale to 0
    --------- Set the panel XY in the middle of the screen or in the position that you like to appear on the screen
    --------- Panel start Tween size to scale back to its original size
    
    7-On Tower animation frame clicked:
    ---------- Pick Tile by UID and enter the Global variable "UID"
    --------------- Tile Spawn Tower 
    --------------- Tower set animation to "Tower animation frame" that you clicked or use a variable to know which tower you need to spawn
    
    
    
    8-On button Close Touched: ------- Panel tween Scale again to 0 to close it and hide it when the tween finishes
    

    That's the basics you need to get started.

  • You could use a Tilemap for this:

    For example:

    Set the Empty tiles to (Tile = 0)

    Set the obstacles to (Tile = 1)

    -On Tile Clicked extract the X&Y into a Local variable

    -Loop in the 4 directions by using the System "For" loop:

    Dir Right ---> For "X" From (TileX +1) To ((Tilemap.Width/TileSize) -1)
    ---------> Tile at(LoopIndex("X"), Y) is not equal 1 ------> Set tile to your desire frame
    ---------> Else: Stop the loop
    
    Dir Left ---> For "X" From (TileX -1) To (0)
    ---------> Tile at(LoopIndex("X"), Y) is not equal 1 ------> Set tile to your desire frame
    ---------> Else: Stop the loop
    
    Dir Up---> For "Y" From (TileY -1) To (0)
    ---------> Tile at(X, LoopIndex("Y")) is not equal 1 ------> Set tile to your desire frame
    ---------> Else: Stop the loop
    
    Dir Down---> For "Y" From (TileY +1) To ((Tilemap.Height/TileSize) -1)
    ---------> Tile at(X, LoopIndex("Y")) is not equal 1 ------> Set tile to your desire frame
    ---------> Else: Stop the loop
    

    Probably a second condition is needed there to make you stop at the edges so you dont check outside the tilemap.

    Tile is not equal to -1

    Tile is not equal to 1

    If you really need to use sprites then you can still do all the tile checks in the tile map as I showed above and then when you need to change the frames just pick the Sprite tile that is located on that Tile by using Pick by overlapping Point XY

    or

    alternative you can do the same job by using just sprites alone if you add two variables to the sprites:

    Tx

    Ty

    At the start of the layout do a loop to set all the (Tx & Ty) variables and use the same system as the tilemaps. But this time pick tiles by comparations:

    Tile.Tx = X
    Tile.Ty = Y
    
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Another idea using Bullet could be to:

    -Add a second Tilemap just for collisions or an alternative is by using Tiled_BG

    -Add the solid behaviour to it

    -Close the grid area by surrounding the grid with thin lines around the 4 edges of the grid

    -Set the sprite bullet settings "Bounce of solids" to Yes

    -And every (5 or X) seconds set "sprite.Bullet.Angle of motion" to a random(360)

    Example:

    The red lines are the collisions, which is a Tiled_BG with solid behaviour.

    One thing that I see in your video is that the sprite comes from outside the grid so you may want to turn off collisions for the sprite temporarily until is inside the grid then you turn the collision on.

    Both behaviours are good for this type of job.

  • tarek2/Can anyone tell me if the TURRET behavior uses more CPU than (set angle to)

    https://www.construct.net/en/blogs/ashleys-blog-2/answer-own-performance-925?srsltid=AfmBOopvjhaNvz-fuFuHQQO-mJDKroGSJjiLhqdu-AcPrmcb1LxTB7ys

    How can I make it so that a family of enemies, when they see the player, can attack him (and stop moving using the bullet behavior instead of Phathifinding.

    When a Family of enemies sees the player ----> Turn Off one behaviour and Turn On the other?

    For the Attacking:

    There are plenty of examples on the forum, you can just do a quick search if you get stuck.

    Also, there are hundreds of examples on the C3 editor you should be able to find one that meets your requirements.

  • I'd like to clarify my specific needs a bit further:

    I have a single layer containing multiple images and platforms. What I'm trying to achieve is to control all these elements simultaneously, making them move downwards on the Y-axis automatically with each frame. Despite trying various approaches, I haven't been able to find a method that works for this specific setup.

    A few ideas you could do:

    1-Put all the objects in a Family and then just set the "Family.Y" Position to move the objects.

    Or

    You can also add some behaviour to the family like the Bullet and set the speed and let it run automatically.

    2-Another idea will be to create an object and name it for example "Scrolling_BG"

    -Add all the objects from the layer that you need to scroll to a Hierarchy with "Scrolling_BG" and make the "Scrolling_BG" as Parent

    -And set the objects to just Transform the Y on their Hierarchy settings

    -Move your Scrolling_BG.Y manually every tick or add a behaviour like a bullet. This will make scroll all the objects in the hierarchy together with their Parent.

  • Yes, thank you. But in fact, I am already quite demoralized, it is very difficult to find something suitable for C3, and the guides that are available for C2 are not always suitable either.

    for myself, I spent quite a long time:

    https://www.dropbox.com/scl/fi/lmo81e4rngd5i7dh1t41i/MBAZ.c3p?rlkey=yky6u8litck5gf5aaux9s29hv&st=usdovz84&dl=0

    I tried to do everything according to the guide (A series of guides that lasted 2 hours at a time) But when the time came that the item should appear in the inventory, I faced the problem that I could not pick up and put items in my inventory.

    https://www.youtube.com/watch?v=cNxjdxbRpIg&t=1s

    I believe that the point is that the guide suggested making two inventories, one for "Potions" and the other for "Swords". If you don't mind, you can point out my mistakes here

    In fact, I feel much better when I can talk to a person.

    And now, I have finally separated myself, I want my inventory to be visualized.

    Hi

    I definitely dont have the time to check some else projects I'm afraid, this is quite a lengthy task that will take several hours if not days, and it's always an endless back and forward because new questions always arise, which is time that I dont have even for myself.

    I have done my bit, I will leave it for any other user that has the time and that wants to jump in and give you a hand. But keep in mind that all the users work for free and normally the forums help should be for (Quick Questions & Quick Solutions) that do not require too much involvement. So if you dont find any users then this could be one of the reasons to keep in mind.

    If you dont find any users consider paying an hour or so to a Freelancer who can sit with you check your project and give you some coaching while you finish your inventory. And so you can ask questions and any concerns, which I think is the one you need.

tarek2's avatar

tarek2

Early Adopter

Member since 26 Jan, 2016

Twitter
tarek2 has 12 followers

Trophy Case

  • 8-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • x5
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

15/44
How to earn trophies