retrodude's Forum Posts

  • You can still access global variables using the execute javascript command in construct2. I'm wondering how I can directly change the value of the global variable using the javascript browser command in the events.

  • RuneS

    jabelone

    Are you using cocoonjs for compilation? If so then it won't work. Maybe with phonegap it might.

    Edit:

    I just realized this is an old post......................

    jabelone

    Please refrain from posting on old threads that are irrelevant and somewhat dead.

  • The links posted by Kyatric will definitely be useful. You could also do some searches around the forum. You may just come across some useful information.

    noless

    I'll try explaining it to you in basic logic.

    If you plan to do just one "Best Score" for the user then you probably don't need arrays. Unless you want a leaderboard? Which I'm assuming you don't.

    You should use webstorage to store the value. Webstorage will remove the stored value if you clear you cache (I believe this is how it works). So its good for storing or saving values.

    Event>Action

    webstoreage>setlocalvalue will let you store the required value into a "key".

    you can then load value from the key to a global variable.

    For example:

    global variable num = 5;

    webstoreage set localkey "getval" to num;

    ->You now have the localkey "getval" which has stored in the value 5 from num.

    You can then load the key, and set num to this key by using a command like this:

    Set num towebstorage.localvalue("getval");

    num is now equal to the stored value in the key.

  • Is it possible to change the value in the global variable using the execute JavaScript action? I'm trying to integrate fgl's sdk and I'm having issues with integrating their premium feature.

    Here's what I have tried so far in pseudo-code:

    global variable number premium = 0;

    Following this format-->Event>Action

    OnTouched premiumButton > Browser.Execute javascript "fgl.inApp.initiateUnlockFunction(function(){"&premium=1&"},function(){"&premium=2&"});"

    Problem:

    This doesn't seem to change the global variable in Construct2 when the function call is made. It does initially make the call and create the menu to accept or cancel it but once again it doesn't change the variable when the function is called. Is there another way to accomplish this?

    Such as declaring a variable within the execute javascript command?

  • fldr

    I think its an issue from fgl (the ad part). I'm also having problems getting the ads to close on chrome although it strangely works on opera and firefox (tested on android). From what I can gather, branding seems to work. I'm still having issues getting the scoreboard to work mainly because I'm not sure what scoreboard we use. Is it gamersafe scoreboard that we need to submit scores?

    tumira

    Whoops, I foregot to edit my post, I read that on the fgl forums but fore-got to update my post.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Does anyone know what fgl means by pause/resume? I just read there implementation sdk pdf file as well as there sdk documentation and it says nothing about pausing or resuming in their sdk. So how do we integrate it? I even went through there fgl.js file and there's no function call or anything that is remotely close. Or is it just regular pause and resume from construct2?

    Also apparently if you want the tier 3 prize of 200$ you need to have achievements working. Which isn't even supportive in the v1.2 of fgl's sdk. So I guess I might use the previous sdk then.

    I'd rather not wait for the plugin, I think I'll just try normal means to implement the sdk.

  • his master who

  • I'm having a similar black screen issue as DARTH Crusher on my samsung galaxy nexus. After ludei loading screen I'm stuck at a black screen with a rocket floating, and that's about it.

  • It would be good practice, but flappy bird is pretty much a template now. Which really ruins the fun of learning the algorithm which would probably benefit the c2 user and allow them to make their own personal flappy bird game unique.

    But nonetheless I have come across some good examples of clones for flappy bird that have flattering artwork to go with it or additional features like shops, which doesn't directly cut and paste from the template created by Tom.

  • -Removed-

  • Paradox

    Don't fore-get the coffee my good man. (Preferably java coffee if you really wanne show your obsession for programming)

  • Sheepy

    I really like the concept of darkness as it uncovers the pathway for our heroine. Amazing idea, it adds suspense and really creates the theme for your game. <img src="smileys/smiley20.gif" border="0" align="middle" />

    The downside however is the lag I'm experiencing when playing. It might just be my laptop or it could be due to all the effects you have running. You mentioned using webgl effects? This could be why its causing the slowdown. But I'm definitely positive this game can be optimized. It's a great concept after all.

  • Games built in 2 days with my group at CanGame for the Tizen contest. There now available in IOS.

    Memory Farm:

    [tube]http://youtu.be/6moloKzbM7I[/tube]

    Monster Jump:

    [tube]http://youtu.be/703bvKvHVrA[/tube]

  • tatogame

    Oh my god... This game is brilliant!

    But I think you could change the title of the game to something else that's a bit more friendly. Other then that nice job.

  • I realized that after I uploaded the video, the beam trail effect was on the wrong layer so you can't see the pretty sparkles and the proper trail alignment... I'll upload a new video later.

    But yea it's and endless fake 3D flyer where you input any url from youtube and it generates a random set of obstacles based on the url. All art is placeholder. I was server scripting a highscore system to save the url and place top 5 highscores for each url but I got lazy so that's also incomplete.

    Yes this was made in construct 2.

    [TUBE]http://youtu.be/3vFw20BY93k[/TUBE]