tarek2's Recent Forum Activity

  • Sorry my bad, I was trying to call the tween with the tag.. "DashboardUP"

    I see

    Normally, for this type of situation, the only way anyone can help you is by posting a minimal example so they can investigate it and show you what was wrong as it's hard to debug without seeing your project. They will just guess.

    Here are some ideas you can test:

    1-Make sure that the Tween "MoveToCentre" finished is triggering by adding a console log as you did on your second trigger

    2-If the above tween Trigger is working then I will run the project on debug mode and check if that "PlayerBase_Collisions......" Boolean "isBasegrab" is = True

    3-Then If the above two are true, I will run the project on debug mode again and check if the object "PlatformWindow.........." Exist on the current layout

    4-Then If the above three are true, I will check that both Names (Trigger & Tween Action) match "DashboardUP" without any extra spaces

    5-Then If all above are true I will post a small example reproducing the problem

  • One idea will be to keep track manually.

    Here is one example:

    It will Pick and destroy all the black sprites and show who was the last one destroyed.

    dropbox.com/scl/fi/c3tp5wgwqhlmqpgst6fns/Pick-Last-Destroyed1.c3p

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I can't see on your picture the event for:

    On any tween-finished?

    Are you sure that you are targeting that trigger and not a different one?

  • tarek2It's still a little confusing, I'll try, this is very difficult, I'm trying everything,

    but it's difficult to do this by creating 8 objects and adjusting them to the grid 🙁

    dropbox.com/scl/fi/h2zhtxyg892gccasti18m/Position-a-Grid-of-objects-inside-another-Grid2.capx

  • tarek2 The blue balls are separated, so I'm having trouble creating them, I would like you to create 9 objects and adjust the grid

    I think I already showed you that:

    Honestly, I'm scared to answer any of your questions as each time I resolve an issue there are 3+ more new questions to resolve that weren't part of the question. Im gonna have to take a break from this post.

    I think I already showed you that here:

    https://www.construct.net/en/forum/construct-3/how-do-i-8/hi-guys-help-positioning-183839#forumPost1113792

    What have you tried???

    There are so many options available:

    Use a Tilemap loop through all the tiles and spawn your tiles

    or

    Just loop through each tile of the tiled Background and spawn your objects

    You can sue the "For" loop XY

    For "Y" From 0 to (Base.Height/48)-1:
    ----> For "X" From 0 to (Base.Width/48)-1: 
    ------------> Spawn object at:
    ------------> X = base.BBoxLeft + (48 * loopindex("X"))
    ------------> Y = base.BBoxTop + (48 * loopindex("Y"))
    
    

    or

    Uses (Hierarchies & Temples)

    1-Create a Grid_Base for the objects, this will be the Parent and the Temple to create at Runtime

    2-Set the 9 objects in the Grid_Base object

    3-Add the objects to a Hierarchy with the Grid_Base object and make the Grid_Base as Parent

    4-Make the Grid_Base Object as a Temple and call it any name you like:

    for example "Grid Of Objects"

    5-Now to create the objects:

    on touch Grid 
    --------> Create Temple "Grid Of Objects" & Create Hierarchy = Yes
    --------> Set the Position as I showed you
    --------> Grid_Base remove children
    --------> Grid_Base destroy
    

    You are left just with the objects inside the grid

    There are many more ways... Good luck

  • tarek2 Sorry if it's a little confusing,My English is not very good, but here's an example of how I want it to work based on the example in the video I made.

    https://youtube.com/shorts/0G2LS_-WJH0?si=-k6w0_Cdzg-6jUIB

    Hoh, that is a totally different question, forgot about what I wrote Avobe.

    The best thing to do if you struggle to explain an issue is just make a video as you did or use pictures as that helps a lot.

    https://www.dropbox.com/scl/fi/law61d0jyxzbbwuh8xbb1/Position-a-Grid-of-objects-inside-another-Grid.capx?rlkey=e916zytgmwacjc4uhhg3rx9u7&dl=0

  • tarek2Can you help me with this? It's similar to the positioning you teach me

    How can I make it stop when I touch the grid, (which is tiled background) Will it be positioned correctly instead of off-screen?

    I was using this format

    -on touch grid

    > System create at (round(touch.x touch .Y) -48

    round(touch.x touch .Y) +48

    Etc...

    Honestly, I have no idea what you are trying to do:

    1-This code doesn't place an object in a grid:

    round(touch.x touch .Y) 

    As it just rounds the positions of the Touch XY. So just here I'm already confused about what you are trying to archive. I thought you were trying to place all your objects in a grid?

    Perhaps you meant:

    floor(Touch.X /48) * 48 
    floor(Touch.Y /48) * 48
    

    This places any object in the World Grid which has Tile (size = 48)

    This is assuming that the Origen Points of the objects are at the Top-Left otherwise you will need to adjust it slightly.

    2-Spawning Objects:

    Assuming that you are already positioning and centring the Touch XY correctly in the grid as I showed above then you can just use:

    Example:

    Variable = X
    Variable = Y
    
    Set X = floor(Touch.X /48) * 48 
    Set Y = floor(Touch.Y /48) * 48
    
    Spawn Object at (X - 48, Y)
    Spawn Object at (X + 48, Y)
    
    

    You dont need to round it again as you already centred the Touch XY variables.

    3-How can I make it stop when I touch the grid, (which is tiled background)

    3-How can I make it stop when I touch the grid, (which is tiled background)

    Here I am not really sure what you mean:

    Do you mean stop the full loop?

    Do you mean Dont create the current object?

    Something else?

    I am gonna assume that the problem is when you're trying to create an object you dont want it to be created inside the grid right?

    That means that you want to create objects only outside the Tiled BG grid.

    Though am confused as to why you use "-on touch grid" if you just want to create outside the grid.

    But since you asked:

    You can use for example the system:

    "Pick by overlapping point"

    Make it the Top parent condition

    Pick by overlapping point (Tiled BG) (X -48, Y) --------> And Inverted Negative
     -----> Spawn Object at (X - 48, Y)
    
    Pick by overlapping point (Tiled BG) (X +48, Y) --------> And Inverted Negative
     -----> Spawn Object at (X + 48, Y)
    
    
    

    Now, I have the feeling that you meant to ask:

    How can I create only inside the grid and "stop when is not Touching the Grid" instead of "is touching the grid" as that makes more sense to me.

    Use the same code but dont invert it.

    Pick by overlapping point (Tiled BG) (X -48, Y) 
     -----> Spawn Object at (X - 48, Y)
    
    Pick by overlapping point (Tiled BG) (X +48, Y)
     -----> Spawn Object at (X + 48, Y)
    
  • So I think that the time has come to deal with the inventory. but I have the same feeling as if I'm trying to eat a bigger fish than I can (metaphor).

    You have dropped a rather interesting specimen. and it made me think that I can also send you what I did and supplement my project with comments.

    https://www.dropbox.com/scl/fi/ldd0msm7rfopbxp8fh7ix/MBAZ.c3p?rlkey=5muo60eu6iwo1pvjj5rf0o7bv&st=1fjf50c2&dl=0

    In fact, I have been struggling with the inventory for quite a long time, it feels simple at the same time, but when it comes to practice, it is as if I am stuck in an invisible barrier that I cannot cross.

    I would recommend you to look for tutorials on inventories and choose the one that you think you could follow.

    If you are visual learning then maybe you could also look at Youtube tutorials and follow them step by step.

    If you spend some time learning you should be able to make the inventory that you envision.

    Some tips that could help you, though there are different ways you could approach this:

    -You can pin the slots to the inventory panel by Hierarchy. It will be easier if you make each slot tiles single so you can pick them easily.

    Or you can use a tilemap.

    -To Pick the different slots easily you can add an instance variable like for example "Type" and then you can set the slot to your different name types like (Hunting pants, Gorka pants, etc...)

    -Add the (Drag & drop) behaviour for the items that you place in the slots so they can easily drag and remove them from the slots.

    You may need an Array as I did or may not, depending on how complex you need it. For example, how do you know you have free tiles etc... You can do it via Boolean on the tiles "Ocupaid" and then set it to (True/False) or you could use Arrays.

    As I mentioned, these are just ideas as there are different ways you could do the same thing.

    The best thing is as I said earlier, choose a tutorial that matches the style that you want for your inventory then follow it, as normally they will show you everything you will need. Then you can start incorporating your own ideas once you have an understanding of how everything is working.

    Good luck.

  • I don't quite understand what I should do

    I just want to make it so that when the player has equipment, he changes the old equipment to the new one and vice versa

    And I also use a translator, because of which you may not completely understand me, as I do you

    But no matter what happens with that translator, I really need help and I will try to follow your advice

    Hi

    Yes, the translator can sometimes be inaccurate.

    I am still not really sure how your equipment works, as it can vary a lot depending on your needs and we dont have all the info.

    If I have to guess just by looking at your pictures alone:

    1-First picture you are not wearing Pants

    2-Second picture you Pick up pants1 from the floor and wear it

    3-Third picture, you pick up pants2 and wear it but you do not drop anything so it looks like you need to store the pants in an inventory

    4-Forth picture, you drop the pant2 that you currently wearing and then you put on any pants that you had in your inventory which in this case is pants1

    If that is correct, there are many ways to do inventories.

    Here is one example see if it helps you:

    https://www.dropbox.com/scl/fi/yxnkl8bbsn290emgkgip3/Inventory2.c3p?rlkey=2y86mbgnxcv8eflzt13t5agif&dl=0

    If this is not what you are looking for, then one possible solution is that you could explain it in your native language and then add a translation in English too, the forum allows that as long you post the translation in English. By doing that someone who speaks the same language could help you much quicker or at least will help in translating it to English.

  • One of the reasons I dont use Groups to do the (Active & Deactivate) feature is because when you have many groups it becomes annoying to have to loop and deactivate them before leaving the layout so you can find them in their original state the next time you come back to that layout. That is why I switch to instance variables in an object instead as this will reset their state every time I come back to the layout.

    I like the idea that proposes Alaistar:

    The availability of making (Local and Global) event sheets or Groups. I have wanted that since I used Construct.

    It is like the Local variables they are very useful for temporary values and once you leave the scope it resets to default values.

  • I'm trying to make it so that the player can't wear both the same clothes and the other at the same

    I can put on both hunter pants and gorka pants at the same time,

    Sorry is not really clear what you are trying to achieve as both statements contradict each other and are confusing:

    But looking at your pictures and your old events, it looks like you have problems swapping long pants that you find on the ground, is that right?

    Example:

    On "F" Pressed & is overlapping pants on the ground -----> Wear it?

    If so, what happens if you already wear pants already?

    On "Q" Pressed & If is Wearing pants -----> Drop it?

  • It seems that you are splitting the events unnecessary and it could be hard to track.

    Why not do everything under the trigger on mouse touch?

    For example:

    On (Touch or Mouse) touch reload button

    ----Sub Event: Clear dictionary

    ------------------- Function Call get sys info

    ----Sub Event: Dictionary "For each key" ---> Add to text ----> newline & ----dictionary.CurrentKey & ";" & dictionary.CurrentValue

    ----Sub Event: Append Newline & "PRESET" & Newline & text & & newline & "END"

    Not sure if it's clear enough the structure as it removes the empty spaces but there are 3 sub Events independent from each other, they should be one after the other

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