tarek2's Recent Forum Activity

  • The score is your timer "timw" right?

    You add to the timer and right away you set the txt so it shouldn't be any problem with anything interfering with those events as they run one after the other.

    Did you make sure that you print the score in the right Txt object?

    Also, "Console log" the variable "timw" after you add 1 and press F12 to see if it works

    Also, "Console log" the Txt after you set the Txt to the "timw"

  • Potentially critical errors on the user's part, in terms of accidentally overwriting something they didn't intend to, saving something in the wrong place and creating duplicates, etc.

    I agree, it happened to me a few times when I click on the wrong File and it nearly overrode it, good I spot it on time.

  • All of a sudden Construct is prompting me to Save As all the time, and it opens to a folder

    Same here it's been doing for a while, I think since R335, I was gonna open a thread to ask the same thing.

  • I created a feature request for the first one "Link to the original Source file"

    If anyone is interested please vote here:

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

  • I opened the suggestion (again since it vanished the first time round :V)

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

    Awesome! Thanks a lot, I will add it to the OP and vote for it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the reply. I'm a noob in coding so far, so I'm sorry for stupid code and questions)

    No worries, there are no such stupid questions, we've all been there. Ask as much as you need. The people that ask questions learn quicker))

    For some reason if I add text to Police container it creates 2 polices and explodes them when created as they overlaps each other:

    When you use the container remember that:

    1-If you spawn the policeman then the Txt will be created with it

    2-Or vice-versa if you create the text the policeman will be created with it.

    And if you destroy one of them then the same thing happens both get destroyed.

    So basically just spawn the Policeman and the text will be created automatically.

    You can read more about containers here:

    https://www.construct.net/en/make-games/manuals/construct-3/project-primitives/objects/containers

    I you use containers then you dont need to pick using the Hierarchy as when you Pick any of the two objects (Policeman or Text) it will pick the other ones inside the container automatically.

    Here is an example with containers:

    https://www.dropbox.com/s/e164gx8uigrr1z8/Containers.c3p?dl=0

  • 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

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