PixelRebirth's Forum Posts

  • Just wanted to thank skyhunter93, bilgekaan, and Pixelrebirth (and anyone else who helped) for giving away their plugins and helping us with this, so, thanks!.

    You're welcome! <img src="smileys/smiley1.gif" border="0" align="middle" />

    Btw it seems Spilgames updated the HTML5 API test tool. Requesting an ad now properly triggers fnPause as well as fnResume. Nice!

    It seems you can't test games with HTTPS urls anymore though, which means you cannot use dropbox. <img src="smileys/smiley19.gif" border="0" align="middle" />

  • Is the jerky scrolling intentional? Maybe the original behaves also this way, didn't care to check.

    But I did check your events and saw that you did Every x seconds -> sprite.X + N

    That's very bad practice, unless you really want this kind of not smooth movement. You should use delta time for moving an object constantly.

    Every tick -> sprite.X + N * dt

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This is a quick adaption of the previous example to the bullet behavior: Download

  • Yes well, with the Bullet behavior you can work with the "Speed" and "AngleOfMotion"-expressions.

    If the speed is over 0 the sprite is obviously moving and the angles of motion would be 0 for right and 180 for left.

    You might be doing something more complicated, in which case a code snippet would indeed help like blackhornet mentioned.

  • Movement behaviors do often have an "Is moving"-condition and also expressions that return the X and Y vectors.

    Here is a very simple example that should be similar to what you had in mind:

    Download

  • I believe you can name parameters with rexrainbow's function plugin.

  • by the way in your new plugin i found only 2 expresions.

    BrandingImage and BrandingLink but as they are no action i cannot asign anything to them .. or how could I?

    besides, how can i set where i want it?

    These expressions return the image url and link address after you have used the "Get logo"-action.

    You can load the image to a sprite with the "Load image from URL"-action. Put the BrandingImage expression there. Because of the Same-origin policy this will not actually work before the game is on Spilgames' server.

    And use the BrandingLink expression to link to the address on click/touch (needs the browser object).

    Ok i managed to get working perfectly fine the part In-Game Ads

    as i am testing it in the "Game API Test Tool"

    the other 2 API Loaded and Branding is not working.

    I set the Api the main menu... just 1 time for sure (i have something that shows me)..

    also the getlogo but, is not showing in there....so, is not working or the tester does not work?

    Yes, I have been discussing this with Raganork before per email. It seems the test tool isn't recognizing the API being loaded. But of course it is loaded, otherwise the ad request wouldn't work. Try removing the "Load API"-action and request an ad - it won't work.

    Raganork has been suggesting that API loaded lights up green if you include the script like described in the documentation from their url. Since you cannot define remote dependencies in plugins this uses a local copy of the script.

    However skyhunter93 also used a local script and his implementation got still accepted. You can of course try to remove the script tag adding spilgames.js in the index.html file and add the script from the documentation instead.

  • Just delete the folder of the old plugin (found in \exporters\html5\plugins\)and then simply drag the c2addon-file into an open Construct 2 window.

    The old link has been updated, here is it again: Download

  • Thanks a lot Not still working but managed to do the LoadApi...

    even so i did not found the "branding Logo" option about GetLogo

    nor in actions...or conditions or expresion..

    all i got as expressions were..

    Count, IID, MyExpresion, PickedCount and UID

    so really not sure how to set the GetLogo, may be i just have an old version. can you confirm the version or check if you manage to see the GetLogo?

    or you just have to set GetLogo inside the as message in the load the spilGames API text?

    I updated the plugin already once. The earlier version didn't have the "Get logo"-action and the expressions yet. Please download the plugin again. The current version has the .c2addon file extension (previous one was just zip).

    EDIT: Please download the plugin yet again. I updated it to fix problems with minification and the "Get logo"-action. Current version is 0.91.

  • PixelRebirth: Thanx for the plug in. Just to be sure, I must call the LoadAPI at 'on start of layout', and 'Request Ads' at the time when I need to show ads (for me, its on clicking play again button), right ??   Still in doubts. Do I need to make timescale 0 ? Is there a variable to change (for eg 'apiTry' in an example on this thread) ?

    P.S.- This is my very first HTML5 project and I am not too much familiar with Construct 2 yet.

    Yes, add the load API action ideally in the first layout with a "On start of layout" condition. Make sure to only do this once. Don't add it to every layout and in case the user can go back to the very first layout the event shouldn't run again either.

    And yeah, when you want to show an ad, use the request action. You will have to define what happens when an ad is shown with the "On pause" and "On resume" conditions. Disable user input ingame or whatever is required. Setting the timescale to 0 and back to 1 could very well be part of it. It very much depends on your game and where you want to show ads.

  • to really Load the api...

    and finally the Branding Logo.

    that last part not sure was mentioned on here..

    You're right, the branding logo wasn't covered in this discussion yet. Depending on the terms of your contract you might not even have to use this part of the API.

    However this functionality is part of my plugin. You use the "Get logo" action and then can return the image address and link from expressions.

    I didn't test this yet, but I imagine it should work. When I can confirm it all working myself I will make a thread with a little documentation for the plugin.

  • and a lot of times you say "capx" what does that mean i never find a file with that name.

    Capx is the file extension of a Construct 2 project file. <img src="smileys/smiley12.gif" border="0" align="middle" />

    the problem is, should all the code be in the index.html?

    Custom javascript should be added within a script tag in the index.html file itself or in an included js file.

    skyhunter93... does your code use all or just advertising?

    because that part works for me but nothing else.. and I at least tried to do exactly what you say you did...

    What do you mean exactly by nothing else? There isn't much the API does besides showing an ad. Do you mean loading the branding image information?

    You could also try using my plugin I linked above, which should work without having to add any javascript at all.

  • My game just passed QA! I had no problem using the library embedded on the plugin :)

    Great! Good to know, so the implementation is fine!

    skyhunter93: Can you please share a test capx of how you implemented the Spilgames api. It would be really helpful for us to know the proper steps, than experimenting out by ourselves. Thanx.

    All the proper steps are actually evident from reading the posts in this thread carefully. Skyhunter even posted the plugin he used, which includes the API js file for you.

    You need to define the fnPause and fnResume functions changing some variables. And use the execute javascript action and expression within C2.

    It's all described in this very thread. <img src="smileys/smiley2.gif" border="0" align="middle">

    EDIT: You can also use the preview version of my plugin which I'm currently using to submit my game. Download

  • There are already threads about this here on the forum. Check out this one: link

  • I think skyhunter93 should have the proper feedback from Spilgames by now, but he doesn't seem to be around.

    Unfortunately I will also have to submit my game without knowing if the implementation will work properly and be accepted.

    stelarfox Actually all the information is available in this thread if you read the posts carefully.