Search Unity

Ads for reviving player

Discussion in 'Unity Ads & User Acquisition' started by max3241, Jan 27, 2020.

  1. max3241

    max3241

    Joined:
    Jul 12, 2016
    Posts:
    37
    Hello
    I wanted to put in my iOS video game a rewarded Button to watch ads, when my player dies. Like that, when I watch the ad, I could revive back into the same position that I died. Does anyone know a script for that pls??
     
    Last edited: Jan 27, 2020
  2. kyle-unity

    kyle-unity

    Unity Technologies

    Joined:
    Jan 6, 2020
    Posts:
    336
    max3241 likes this.
  3. max3241

    max3241

    Joined:
    Jul 12, 2016
    Posts:
    37
    Thank you very much bro but what is the script to revive back the player at the same position before he died?
     
  4. kyle-unity

    kyle-unity

    Unity Technologies

    Joined:
    Jan 6, 2020
    Posts:
    336
    That depends on how your game works! :) You could save the player's state before dying and then restore it within the OnUnityAdsDidFinish callback.

    If you have any other questions about how to script features in your game I recommend you check out the Game Design subforum:
    https://forum.unity.com/forums/game-design.71/
     
    max3241 likes this.