otomecha's Forum Posts

  • Hello!

    Recently, I have migrated my entire project to a JSON data structure and I am having problems figuring out how to remove values from it without knowing the index.

    The array looks like this (when full), but is also dynamic (it can be less of them)

    "Gacha": [29,30,31,32,33,34,35,36,37,38,39,40],

    Could be like this at some point, or even empty.

    "Gacha": [29,30,31,32,37,38],

    What I need is to check if values from 29 to 34 exist and if they do, delete them.

    Same for range from 36 to 40.

    The parameters for JSON to remove point to index, so I'm not sure how to get the index of the values...

    Thank you for your help!

    Tagged:

  • Where do you have that "is empty" check? It should be performed AFTER the array is loaded from AJAX or Local Storage.

    I'm guessing the check is done before the data is loaded from LS.

    You need to change how you load the data. I assume you want to try loading from LS first, and if LS data doesn't exist, then load the default data from the project file.

    Empty check is on start layout.

    For the data that you commented I had no issue loading as it is.

    (update)

    I took it outside as a separate condition and it works! (I wanted it to check this just when I load the layout, since I hide it in a diff way if it becomes empty while you are in the screen)

    Thank you!

  • Hello!

    I'm trying to check if my array is empty, but it's not working and I'm not sure why.

    So I load my array here. This works.

    Then I do this to check, I would like some buttons to get destroyed when it's actually empty.

    Here's an image where you can see the array is empty on the width, but the buttons are still there.

    I've also tried with this, but the result is the same :(

    Anybody know what am I doing wrong? Thank you!

    Tagged:

  • You do not have permission to view this post

  • If you use ecpm floors it is fully normal that you don't get an ad every time you request one. If the user for some reason don't get any ad served (to high floor or any other reason), the app immidiately try to request one again, and again.. This can go into an infinite loop where the app make hundreds of ad requests in a very short period of time.

    This will also decrease your match rate.

    I believe Admob will probably block serving of ads to these users totally since the get swarmed with never ending requests.

    Thank you for your response! Any idea on a better implementation :/ ?

  • Hello!

    I'm having issues with the eCPMs (same country composition, similar DAU and downloads) since my last update (android). For one side I placed new ad IDs, that take some days to get adjusted, but on the other side I changed the way I called them from the game, and I've read that doing too many 'calls' without showing may affect eCPM negatively. I'm seeing too many requests in the admob graphs, so this may be actually the issue.

    I'd like to share how I'm doing it know to see if you guys think this may be a bad approach so I can iterate the system for the next update that is coming.

    Approach nº1:

    I had a medium floor rewarded interstitial and a low floor one. So I tried the "on [medium] failed to load, load [low]. I made a post for this because this didn't work and it may be a bug.

    Approach nº2:

    I created 2 ad units (medium floor rewarded interstitial) and (low floor) rewarded. I made a layout called Ads.

    I added it as an aditional layouts to my other layouts. On the main screen I called the actions on the on the "start" layout.

    On my map layout (where I need them) I call them this way, layout Ads is also included.

    In one of the locations layouts "house" I have a part locked where I also use them.

    My idea with this was always having an Ad ready, because in the past, some people couldn't get the ad when they needed, and also to simulate the waterfall. I priorize the mid floor and show the low if it's not loaded (fail wasn't worked :/)

    The requests are crazy high... so this may not be a good solution after all...

    All help and ideas is wellcomed and appreciated! Thank you!

  • On the action you can use "Outfit"&self.number you don't need this counter variable. Same with HasKey move it down below the For and use Outfit&self.number. It won't be out of sync anymore because it's running through all existing instances of Family and using its own variable.

    Thank you!! this worked like a charm!

  • It should work if you give them a Family instance variable number as the identifier and run for each ordered by variable.

    Thank you for your response!

    I actually have an instance with a number asigned to each one, I don't know if you referred to something like this? This example in the photo doesn't work, it has the same problem as the previous approach :/ When any of the outfits is deleted from the scene, it 'jumps' it, and misplaces the "owned" :/

  • Hello!

    I was trying to come with an automatic way to check and set this instance variable "owned" for my instances inside this family. It does work, however, when the instances are deleted it skips them and the owned value gets 'misplaced'. I was wondering if there was a way to go through all of them regardless? Or it will cause an error because the object is not on scene? Any idea on how to do this differently? I was resigned to try to add them manually :( Thank you!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I would try to do a log with the browser plugin when the load failed to make sure it is working or not working as expected.

    How do you make the load fail? Could it be a method that is not doing what you think it's doing?

    A few bugs related to adverts were solved in Beta release 340, not your problem but maybe more bugs exist.

    https://www.construct.net/en/make-games/releases/beta/r340

    Maybe try that release anyways and if it still is a problem file a bug report.

    Hey! Thank you for your response! I couldn't find the solution for the "on load fail" not triggered in rewarded intersititals. It may be a bug, or it may be that the ads take too long to load and fail, I'm not really sure. What I tried instead is to have 1 rewarded interstitial and 1 rewarded video (so 2 different types, with different floors) and just show the one that loads first. It seems to work fine, but let's see when the update is approved...

  • You do not have permission to view this post

  • You do not have permission to view this post

  • Local Storage will not be reset when the game is updated. Unless the user uninstalls the game and then installs a new version.

    Thank you!

  • Hello!

    I am working on a wardrobe feature for my game. You can get some of the outfits through in app purchases, and others through ads.

    I'm worried about what would happen when I update my app. For people who purchased them, it's no problem, it's tied to googleplay. However for people who unlocked things through ads... If I store them in local storage, I may lose them after an update, right?

    Is there any solution to that?

    Thank you very much!

  • Hello!

    I recently introduced a new update in my game. I use the native ads plugin for admob and tried to replicate something that worked in my previous version (with banners), now with rewarded interstitials.

    Basically I created 2 ad units in admob with different floors. And told the game to load one ID, and if that one failed, to load the other ID. Admob shows viewers for both, so it works.

    This works. However, when I tried to do the same with rewarded interstitials it doesn't work... and I really don't know why. Since apparently it follows the same logic...

    Any idea on why or alternative solutions? :/

    Thank you very much!

    Tagged: