tarek2's Forum Posts

  • I tried it myself and even GPT 3.5 is able to understand C3 code and generate simple events.

    I'm scared...

    Yeah, I'm worried too as this looks like is going wild with all this Ai etc... I wonder how long do we have until the Gaming industry could totally collapses? at least for Indis Because soon with a press of a button you will be able to generate a full game or close, so even a 9-year-old could be a game dev. If this point comes the market will be flooded with billions of games as if it wasn't already saturated.

    Better make all the money you can in the next coming years as the future is uncertain lol.

  • You need to pick the right text that is linked to the Police that collides with the bullet. You can do this by putting them in a container so that when you pick the police it will pick automatically the text object.

    Alternatively, you can pick the text differently if you dont want to use containers, how did you pin the txt to the policemen? If you use Hierarchy then you can just do:

    PolicemanPick child Txt object

    You do this after the collision in a subevent

    Update:

    Also, you have many issues with your code not related to the txt issue:

    1-On collision is the same as overlapping but triggers once so you dont need to check for extra overlap on your second condition you can remove that.

    2-On collision already picks the policeman so you dont need to save the UID and picked again as it will maintain the picking throughout that scope including subevents, so you can remove that too.

    3-Trigger once you dont need it swell as the "On Collision" is already a trigger once, any actions you have there it will run just once.

    Here is how it should look:

    On Collision:----------- substack 1 from health & destroy bullet

    ----Sub: Hierarchy Pick child txt: ----set txt to policeman health

    ----Sub: Policeman Helath <= 0 ------ Your Actions

  • Perhaps round() instead of floor() would feel better.

    The problem is that he needs increments of every 30 so if you round it you lose the (every 30) and become (every 15).

    Example:

    By using Floor, even At angle 29 it will still keep it between every 30

    floor(29 /30) * 30 = 0

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

    But If you round it, when you are just at Angle 15 you will jump to Angle 30

    round(15/30) * 30 = 30

    You lose every 30 and it becomes every 15

  • Method1:

    If the tilemap is not very big you can spawn invisible tiles on the locations and when you want to spawn the objects pick a random Tile:

    -Spawn the object

    -Set the tile as occupied or delete it

    Method2:

    If the tilemap is big you can store all the tile IDs in a 1D Array:

    -Then pick a random index

    -Spawn the object

    -Delete that index

  • You can download a copy and store it on your PC:

    1-Save

    2-On Saved add the System Save JSON into a dictionary

    3-Download the dictionary Asjson

  • You need to loop for the whole TileMap and compare the Tile ID and if you find any with (Tile = 0) replace it.

    Here is an example:

    I replace all the (Tiles = 0) for tile 64

    https://www.dropbox.com/s/y0upe5m9fnfpiyx/TileMap_Change%20Tile.c3p?dl=0

  • 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:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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