playMaker

Author Topic: Chartboost  (Read 12725 times)

app_advisory

  • Junior Playmaker
  • **
  • Posts: 80
    • View Profile
    • App Advisory
Re: Chartboost
« Reply #15 on: November 12, 2014, 07:23:24 AM »
In the actions, you have to choice if you want the interstitial at startup, at game over etc...

Just take one by action.

That's it

xhidnoda

  • Full Member
  • ***
  • Posts: 231
    • View Profile
Re: Chartboost
« Reply #16 on: November 12, 2014, 10:15:04 AM »
great! i will test this  ;)

Phuzz

  • Full Member
  • ***
  • Posts: 102
    • View Profile
    • Bzilla Games
Re: Chartboost
« Reply #17 on: February 18, 2015, 10:11:59 AM »
Hello,

I would like to confirm that these actions are working pretty well, I am using Playmaker 1.8 and unity 5.0 . Thank you for these actions :)

However I have noticed after trying to get to Show More apps, an interstitial ad was showing, after looking into the Chartboost Playmaker Actions I have noticed a few misplaced lines,  I have attached screenshots of what I changed to get "MoreApps" working, incase you want to use these actions.

I can also upload the fixed scripts if requested, but shouldnt be hard to fix anyways. Check Screenshot Please.

Thank you again, Chartboost is working well in my app.
Bzilla Games "Education with a Tickle!"
Qbucket Games "Voxel Games"

iEpic

  • Playmaker Newbie
  • *
  • Posts: 48
    • View Profile
    • IndieGamerWorld
Re: Chartboost
« Reply #18 on: February 19, 2015, 08:52:47 PM »
Hi,
    I'm a little confused on how to get this working right.
There is a lot of locations to choose from, but how does it know these locations in the game?
Like how does it know when you are in the main menu, or home screen, or when it's paused?

When my character dies, I want to give the option to watch the video ad to continue from that spot instead of restarting the level.
How do I setup the locations in my game. Like how could I setup the UI when you die to one of those locations?
I'm a beginner programmer so hopefully it's a simple task.
Thanks and I appreciate you taking the time to make these actions!

Phuzz

  • Full Member
  • ***
  • Posts: 102
    • View Profile
    • Bzilla Games
Re: Chartboost
« Reply #19 on: February 20, 2015, 01:09:24 AM »
Hi,
    I'm a little confused on how to get this working right.
There is a lot of locations to choose from, but how does it know these locations in the game?
Like how does it know when you are in the main menu, or home screen, or when it's paused?

When my character dies, I want to give the option to watch the video ad to continue from that spot instead of restarting the level.
How do I setup the locations in my game. Like how could I setup the UI when you die to one of those locations?
I'm a beginner programmer so hopefully it's a simple task.
Thanks and I appreciate you taking the time to make these actions!

Hello,

These actions do not know what is happening in your game, the locations are basically just "Save Slots" for your convenience incase you have more than one ad showing in the game, to have a reference each one what is it for.

For Example, in your case:

At the startup scene of your game, you can ad the action "Has Rewarded Video", check the location "Game Over" then you have to actions to continue from, Success and Fail.

If Success, Send an event to Idle or to load the next scene "Main menu or something", so basically do nothing, because you have a video already cached in your game data.

If Fail, that means there is no video cached in your game data, so then you have to call for an event "Cache Rewarded Video", having a video cached will prevent a call to Chartboost when you want to how a video, and will almost instantly load it. Ofcorse choose the Location "Game Over"

Now when your player dies, you can have one the game over menu, certain navigation buttons
1) Menu
2) Restart
3) Watch Video (To continue from same spot). Now here you send an event, OnClick (Show Rewarded Video). From here you have to do your calls with chartboost, or what you would like to reward the player upon watching the video. Like an event to resume level from same spot.

There is an example scene with the Chartboost actions that will explain what I have here, let me know if you need any help.

Peace!
Bzilla Games "Education with a Tickle!"
Qbucket Games "Voxel Games"

iEpic

  • Playmaker Newbie
  • *
  • Posts: 48
    • View Profile
    • IndieGamerWorld
Re: Chartboost
« Reply #20 on: February 20, 2015, 01:49:43 AM »
ok thanks for the info.

So if it fails to cache an add, does it make since to loop it back in the same state to try to load another ad until it succeeds?

iEpic

  • Playmaker Newbie
  • *
  • Posts: 48
    • View Profile
    • IndieGamerWorld
Re: Chartboost
« Reply #21 on: February 20, 2015, 02:06:45 AM »
An action to know if the video was successfully played would be awesome!
Don't know if it's possible though.
« Last Edit: February 20, 2015, 02:10:57 AM by iEpic »

Phuzz

  • Full Member
  • ***
  • Posts: 102
    • View Profile
    • Bzilla Games
Re: Chartboost
« Reply #22 on: February 20, 2015, 03:04:37 AM »
Usually it will only fail to Cache an add if there's no internet connection or an error in your setup, I don't see any other reasons, if it fails to cache a video just send it to idle and don't loop it because if it fails once its not going to work even if you loop.

In my setup, more apps and Interstitial, it never fails if there's internet connection so i don't see a reason why it would fail, but I have to not show an ad if it isnt cached better than lowering the performance of my game and stuttering the frame rate.

I think on the chartboost dashboard there is an option to let you know if video has been watched, I think there is a game called "Buff Knight" on android, pretty cool game, that has the watch video feature you asked about when you lose, try it and lose, you will get a menu that has an option to watch a video for 5 gems or something.
Bzilla Games "Education with a Tickle!"
Qbucket Games "Voxel Games"

iEpic

  • Playmaker Newbie
  • *
  • Posts: 48
    • View Profile
    • IndieGamerWorld
Re: Chartboost
« Reply #23 on: February 20, 2015, 03:24:28 AM »
OK thanks man you are awesome!
Really appreciate the advice

Phuzz

  • Full Member
  • ***
  • Posts: 102
    • View Profile
    • Bzilla Games
Re: Chartboost
« Reply #24 on: February 20, 2015, 03:33:31 AM »
Welcome :)
Bzilla Games "Education with a Tickle!"
Qbucket Games "Voxel Games"

iEpic

  • Playmaker Newbie
  • *
  • Posts: 48
    • View Profile
    • IndieGamerWorld
Re: Chartboost
« Reply #25 on: February 20, 2015, 07:38:03 AM »
One last thing....

Do I need to do the cache thing every new scene, or just one time when the user boots up?

Phuzz

  • Full Member
  • ***
  • Posts: 102
    • View Profile
    • Bzilla Games
Re: Chartboost
« Reply #26 on: February 20, 2015, 09:32:33 AM »
Only Call the Cache Action After the "Fail" Event of the Has Action, so basically it will only be cached the very first time a player starts the Game, Next time after the Has Action, it will call the "Success" event so it wont be cached again, and will proceed to loading whatever comes next.
Bzilla Games "Education with a Tickle!"
Qbucket Games "Voxel Games"

iEpic

  • Playmaker Newbie
  • *
  • Posts: 48
    • View Profile
    • IndieGamerWorld
Re: Chartboost
« Reply #27 on: February 20, 2015, 01:49:13 PM »
Phuzz, you've been a life save so far, but I have one more thing you could maybe help me with.

So I'm trying to give the rewards for completing the video, and I have no idea if I'm doing it right.

So what I thought of doing is sending a global broadcast event from the Chartboost.cs script that came with the chartboost plugin.

I found and edited this part of the script.
Code: [Select]
private void didCompleteRewardedVideoEvent(string dataString) {

Hashtable data = (Hashtable)CBJSON.Deserialize(dataString);
int reward;
try {
reward = Convert.ToInt32(data["reward"]);
PlayMakerFSM.BroadcastEvent("Add Continue");

} catch {
reward = 0;
}

if (didCompleteRewardedVideo != null)
didCompleteRewardedVideo(CBLocation.locationFromName(data["location"] as string), reward);
}


Basically I just added the broadcast event right after try, but I have no idea what try even is, or if I did this right.

Phuzz

  • Full Member
  • ***
  • Posts: 102
    • View Profile
    • Bzilla Games
Re: Chartboost
« Reply #28 on: February 21, 2015, 01:23:46 AM »
Hello,

I honestly do not know the way you are trying but there is another way I know of, you could use the Playmaker "Invoke Method" from the action list, then Specify Game Object and Drag in the Object that is carrying the "Chartboost.cs" script, or use Owner of its the same object carrying the script as a component.

Behaviour: you should get to choose from Playmaker.FSM and Chartboost.SDK, ofcorse choose the chartboost SDK, then Method Name: Open it and choose "DidCompleteRewardedVideoEvent", after that I guess you could give the desired reward to the player :)

You can find there other methods like fail and dismiss rewarded video to have better control of users.
Bzilla Games "Education with a Tickle!"
Qbucket Games "Voxel Games"

rik

  • Full Member
  • ***
  • Posts: 247
    • View Profile
Re: Chartboost
« Reply #29 on: February 25, 2015, 02:06:56 AM »
can you share new actions with us