[SOLVED] Admob several Rewarded video, issue with the rewarded the user get

Hello Guys,
do any of you know how to use Admob?
I’ve managed to implement rewarded ads (players receive money in exchange for watching an ad, for example). In my game I’ve added 2 different rewarded placements, which don’t give the same gift

Example:

  • My 1st placement reward :
    => appears first in the code,
    => it’s a button available as soon as the game is launched
    => this 1st placement reward gives 10k money when the ad is seen

  • My 2nd placement reward :
    => appears later in the code,
    => it’s a button that appears via a timer, 10 sec after game launch
    => this 2nd placement reward gives 5K money when the ad is seen

My problem:

  • When I watch the ad from the 1st placement, everything works, I watch the video ads, once it’s seen, I get 10k money.
  • When I watch the 2nd placement ad, there’s a problem, I watch the video, once it’s seen, I receive 10k money, whereas for this placement, I should receive 5k.

I have the impression that the reward for the 1st placement (10k money) is taking over from the rest. How can I make sure that when I click on my 2nd investment, I receive 5k money, and not 10k money?

Thanks for your help!

Hi @Kat.Forum

Simply use a number variable which counts the number of rewarded ads.

  • Video ad is watched → add 1 to the variable
  • If number = 1 → give 10k
  • If number = 2 → give 5k

Hello @insein

Thanks for your reply!
I do indeed understand the logic of what you shared and I’ve tried different ways but I can’t find a solution.

My conclusion is that, whatever method I test, when I click on any button for the first time, I receive the rewards of the 3 placements at the same time.

Example:

  • Button 1: 100 money in reward
  • Button 2: 200 money in reward
  • Button 3: 300 money in reward

Example image :

Scenarios :

  • When the app is relaunched, whether I click on button 1,2 or 3, I would receive 600 (100+200+300) in reward.
  • Then (still in the same session, I don’t restart the app), once I’ve clicked on button 1 and received 600, if I click on button 1, I receive 100, if I click on button 2, I receive 200, if I click on button 3, I receive 300…

The problem really seems to come from the first time I click on one of the buttons (1, 2 or 3), it’s always the same problem, I receive 600, no matter what tests I do.

I confess I’m a bit blocked and desperate, I’ve been testing a lot of things for days without success.

The constraint I have is that I have to load and display 3 different admob ad blocks.
This is important, because in google admob I have to identify these different placements, I don’t want the same admob placement to be used on all 3 buttons. And I think that’s the problem. Because I have 3 admob placements, gdevelop seems to have trouble handling this.

If you ever have the time to share with me an idea that could help me out, that would be great! :pray: :pray: :pray:

Here are the different tests I’ve carried out (from the most recent at the top, to the oldest at the bottom). Sorry, it’s a bit chaotic, buttons and rewards don’t have the same value from example to example… But the logic remains the same

Example 4 :

Example 3 :

Example 2 : (when user is offline, he received reward without watching video :/)

Example 1 :

Hello again,

I put together a simplified version. Hopefully if I understood you correctly, it will work out the way you intended.

Hello, Thank you very much for your help.
The solution works perfectly, I was able to perform various checks to ensure that everything is working properly.

It’s very useful, and I can see that your proposal is simple and effective, where I was looking for something too difficult.

Thanks again for your help, I’ve added you to the discord :slight_smile:

Have a nice WE!

No problem! Happy to help.

I rarely use discord but thanks for the add :slight_smile: