Ads every 4 deaths

LuMa GamesLuMa Games USAMember Posts: 129

I just cant come up with a way to show a pop up ad every 4 times you die.

Comments

  • LovejoyLovejoy Member Posts: 2,078

    @LuMa Games said:
    I just cant come up with a way to show a pop up ad every 4 times you die.

    You can try this:

    Make a integer attribute show_ad

    On your play scene make a rule that every time you die change attribute show_ad to show_ad+1

    Make a new scene call it ad_scene in that scene put a rule change attribute show_ad to 0 , after 0.3 sec un-pause scene.

    Then go back to your play scene and make another rule when show_ad = 4 pause game check show advertising and direct it to your ad_scene.

    Fortuna Infortuna Forti Una

  • LuMa GamesLuMa Games USAMember Posts: 129

    @Lovejoy said:
    Then go back to your play scene and make another rule when show_ad = 4 pause game check show advertising and direct it to your ad_scene.

    I tried something very similar to that but couldn't get it to work

  • LovejoyLovejoy Member Posts: 2,078

    @LuMa Games said:
    I tried something very similar to that but couldn't get it to work

    Try it exactly as written, it should work. I use do it this way on my games. Just make sure you put the rules in the correct actors.

    Fortuna Infortuna Forti Una

  • gingagaminggingagaming FREELANCE GS DEV Member Posts: 1,685

    @Lovejoy‌ is correct, you must be missing something.

    Here is another way to do it (see attatched project)

    I have added banner behaviour just for the demo. You can delete this behaviour. Its just showing it fire.

  • Thunder_ChildThunder_Child Member Posts: 2,343

    Create an integer call "Player Dead" put a rule in your "Player" that when dead...change attribute "Player Dead to Player Dead+1"

    Then make an actor called "ads" and place it outside of scene...place a rule that when attribute "Player Death" =4...spawn ad actor (iAds) or show more ads or whatever...

    In your player rule also include a timer that when Player Death =4....after .5 seconds...change attribute Player Death to 0.

    I dont jnow what gingagamings demozip has in it Im on mobile but Im sure his method is going to work. He is a very reliable person with GS.

  • LuMa GamesLuMa Games USAMember Posts: 129

    @Thunder_Child said:
    Create an integer call "Player Dead" put a rule in your "Player" that when dead...change attribute "Player Dead to Player Dead+1"

    Then make an actor called "ads" and place it outside of scene...place a rule that when attribute "Player Death" =4...spawn ad actor (iAds) or show more ads or whatever...

    In your player rule also include a timer that when Player Death =4....after .5 seconds...change attribute Player Death to 0.

    I dont jnow what gingagamings demozip has in it Im on mobile but Im sure his method is going to work. He is a very reliable person with GS.

    I ended up getting it working but I put the reset to 0 function in my replay button

Sign In or Register to comment.