Joao Daniel 2022's Forum Posts

  • Here the animation editor is bugging when I open the editor and change some sprite when I close the editor and press ctrl +z it gives a fatal error

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You do not have permission to view this post

  • You do not have permission to view this post

  • In my game, travelling distances are important. They are stored in an array names ArrayDistances like this :

    At some points of the game, I have to retrieve the values in the table but instead of using numbers for coordinates (I know how to do that), I need to use places names (chateau, village, etc).

    So my code won't be :

    Value = ArrayDistances.At(2,3)

    but

    Value = ArrayDistances.At(cell X coordinate where value ="tour", cell Y coordinate where value="village")

    Any idea on how to do that ?

    try this

    + Array: For each XYZ element + Array: Contains "village" value -> Array: Set value in (Array.CurX, Array.CurY) to 0

  • Google asks if my game has one. An answer is required for publishing.

    look at this article support.google.com/googleplay/android-developer/answer/6048248

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • Local variables are reset each loop, so once you are done with your event that data is lost.

    The object has instance variables, these will be wiped as soon as the object is destroyed.

    Global variables can withstand this - but they are not designed to hold an objects stats since you can have many objects all looking for different values at the same time.

    Here is how I worked with destroying enemies in my last project.

    Enemies have a variable Boolean I set when they are killed and then I destroy them.

    In a new condition if an enemy is destroyed and also has killed true (This eliminates 2 swords killing the same enemy during the same tick) I can call my loot function while still having that enemies position and name stored. I then pass these into a function so I can use them after my enemy loses that information lose the information.

    (Mine is done with Families - but it should hold true with multiple of a single enemy as well)

    Thanks for your support and patience ^_^

  • hi guys, i have a doubt about firebase i'm recently creating a game and the data will be saved in array, json and i would like to know if it's possible to send and receive this data in firebase database, since i can't at the moment pay a private server to save and receive this data

  • Ya call of that info before you destroy the other object.

    Or call a function and send in all the details you need as parameters before you kill the object. Every time I do this it just ends up being messy though.

    I created local variables to receive the variables of the enemies that were destroyed so that when using "OnCreate" nothing seems to work

  • Do you need to destroy it? How does the game work? You may be able to hide it and make it appear again.

    I put an option to drop items on enemies and also to create other enemies in place as soon as the previous one dies, so I need the new enemy that will be created in the same place as the other to copy the same variables of the previous enemy in real time, because enemies of the same type can have different variables and I want the new one that will be created in the same place to copy only the variables of the other enemy that was destroyed

  • Hi guys, I would like to know how I can get the same variables from an object that was destroyed and created another one in real time.

    it works like this I have several objects on the screen with different variables from each other and when the object is destroyed another one equal is created in place and it is necessary for it to be created in place so that it gets the same variables of the destroyed object in real time, the part to create the same object I already learned with a string variable and in it I put the name of the object that will be created in its place as soon as the object is destroyed.

  • howtoconstructdemos.com/roller-paint-demo

    Thank you very much

  • You should do something like this:

    > Variable isEmpty=1
    
    for "y" to 0 a floor(TileMap.Height÷16)-1 
    for "x" to 0 a floor(TileMap.width÷16)-1 
    TileMap: tile (loopindex("x"), loopindex("y")) >=0 
    ..... Set isEmpty to 0
    ..... Stop Loop
    ..... Stop Loop
    
    
    Compare variable isEmpty=1 
    ...... Tilemap destroy
    
    
    

    Sorry it still doesn't work, when I click on a tile to delete it the tilemap is destroyed completely, please when you have some time could you make a cp3

    + touch: to click TileMap
    -> TileMap: arease tile (TileMap.PosTileX(touch.X), TileMap.PosTileY(touch.Y))
    + System: for "y" to 0 a floor(TileMap.height÷16)-1
    + System: for "x" to 0 a floor(TileMap.width÷16)-1
    + System: TileMap.TileAt(loopindex("x"),loopindex("y")) = 0
    ----+ System: isEmpty = 1
    -----> TileMap: destroy