tarek2's Recent Forum Activity

  • You can do:

    floor(angle(Self.X, Self.Y, Mouse.X, Mouse.Y) / 30) * 30

    https://www.dropbox.com/s/ms9jhohtvyhrihv/Round%20Angle.c3p?dl=0

  • If you click the object to open the Animation editor you can find the Collision edit button:

  • You need to pick first in a condition the object by UID then destroy it:

    Use "Pick by unique ID"

    On Click:

    Sub: "Pick by unique ID" ---------- Destroy

  • Some Old C2 Features Request, I can open a feature request if any of this is possible and users are interested:

    1-Can you bring back the feature "Link to the original Source file" in the animation editor as we had before in C2?

    Vote Here if you are interested:

    https://construct23.ideas.aha.io/ideas/C23-I-251

    It was really useful because:

    -When you have many similar frames in one animation and you need to select one for any reason to edit for example, then select the correct one on your PC to make some edits and import it, is difficult as we dont have any reference of that original frame name that the PC has.

    -When you stop for some time a project and came back you can't remember where these frames animations are saved on your PC as we have so many folders and subfolders spread across all the PC so it was useful to click that button to link to the original source.

    Note:

    We have the ability to save into folders so I think now it should be possible.

    And if not at least you could save the (PC path & The Original Animation frame Name) in some text so we can click and copy it.

    ==============================================================

    2-Collision Bounding box:

    You can Vote for it here:

    https://construct23.ideas.aha.io/ideas/C23-I-250

    Construct 2 when we import any animation frame the collision box is always the bounding box by default but in C3 it always tries to guess it, the problem it never gets it right so for each frame I have to go and change the collision and its very annoying unnecessary as you could change it to a bounding box by default as the C2 had and if anyone needs custom collision it could go and change it by himself. Most of the time I just need the normal bounding box.

    It's an unnecessary extra step to do for each frame imported and it could be avoided.

    Example:

    Importing the Monster

    C3:

    C2:

    Thank you

  • If all the objects are from the same object type you need to use family.

    Pick first the single object then test for overlaps.

    Here is one example:

    https://www.dropbox.com/s/c06qg1umxbsracv/Oberlapping.c3p?dl=0

  • Thanks tarek2!

    Your reply motivated me to go over the networking/firewall rules on my PC again. While I had an inbound rule set for TCP/UDP (As described in the C2 instructions), it was only set for PRIVATE... Changing it to also include PUBLIC seems to allow devices on my internal WiFi to access previews again! Still curious as to why I'd need public set when everything is happening internally though.

    Hoh, I remember that, I had the same issue the first time I set it up and spent a long time until I figure out that was the issue, I didn't like that has to be public but there was no choice I left it like that since. Never had any problem though. Not really sure why has to be public as I never asked and I never heard anyone asking about it so it seems like is something normal if you have the same issue.

  • I was forced to update to the last beta R335 to fix another bug and since I started having a new black screen bug, I spent days trying to debug this black screen that is caused by this error:

    "v9" has already been declared

    or

    "v7" has already been declared

    I delete everything until the error stops so the error seems to come from the Function "Canvas_To_Layer_Tranlate_CordenatesY"

    I confirmed this by clicking on the error on the console which shows the C3 js code and the name seems to match the above function name, so it looks like there is a problem with the "Y" parameter inside that function.

    The problem now is, even though I manage to delete everything and leave just the events that have the issue, when I save and close and open the project again it doesn't happen again straight away as it's very random.

    Also, this seems to confirm more that the Function "Y" parameter is causing the issue as whenever I click any parameter it shows that warning "The Y is already used on this scope".

    And again when you close the project and open it doesn't happen right away, everything is super random not sure how to reproduce it so I can open a proper bug.

    Video: https://www.dropbox.com/s/yicftsvejs0cdm9/Function%20Bug.mp4?dl=0

    If I open a bug you will close it as "Can't reproduce" so how can this bug be fixed? as it broke the game with a black screen.

    c3p: https://www.dropbox.com/s/2z4pd2qtigqz9d7/2-Function%20BUG.c3p?dl=0

    Ashley

  • Thanks so much it works! : D What does the percent mean in at the end though for the code? Im just curious so I can understand it better.

    Np

    The percentage will just make sure that once you reach the last frame will loop back to 0, this is to save in making extra lines of events, other ways you will have to add more condition checks like the second option I posted above.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I mean when its at 1 when clicked again it goes back 0.

    Assuming that you have just two frames you could do:

    On Object Clicked: ---------- Set Frame to: (Self.AnimationFrame +1) % Self.AnimationFrameCount

    ==========================================================================

    Also, you can do it by adding Conditions check:

    On Object Clicked:

    Subevent------Sprite.Frame = 0 --------------- Set Frame 1

    Subevent------Else --------------- Set Frame 0

  • Is there a way for it to loop so when it goes to frame 1 it goes back to frame 0?

    If you need to loop back just once on click then you could just do:

    On Click object:

    -----------------Set Frame to 1

    -----------------Wait 1 second

    -----------------Set Frame to 0

    If you need it to loop forever then open the animation on the Animation editor and tick the box "Loop", which is at the Bottom right

  • On Object Clicked --------------Action: object set frame to self.frame + 1

  • It's hard to say without seeing your project but It sounds like an infinite loop.

    If it's an infinite loop, the two events that have the most potential to cause an infinity loop are:

    Event = 8

    Event = 11

    Your Tile size looks like is = 48x48

    Your player most likely is 48x48 swell

    If that is true when the player is standing on the tile next to the door will count as overlapping.

    1-On overlapping door "LVL1_Door4" you send the player to (384,144)

    2-If the Door that is on the next tile of (384,144) is the "LVL1_Door"? Then because it counts as overlapping you have "Event 8" sending the player back to (624,336) which is next to "LVL1_Door4" and because again it counts as overlapping it will send it back to "LVL1_Door".

    So this keeps going infinitely.

    This is just guessing as I cannot see if (384,144) is next to "LVL1_Door".

    You can confirm if this is true by making the Player collision box a few pixels smaller, like 46x46 and see if it works.

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