admir's Recent Forum Activity

  • Hey guys,

    I was looking into C2-created games published on the Google Play market and I thought I'd make an observation on how reviews looked like. I saw a ton (relatively) of 5 star reviews with an empty void in the middle, and maybe a couple of 1-star reviews. Now this advice is for both the reviewer and the game creator: don't put in just 5 star reviews please. Give it 4's and maybe some 3's and a sprinkle of 2's so the rating doesn't look unnatural and raise eyebrows.

  • locohost - +1 to mongodb! There are a number of providers like MongoHQ and MongoLabs that provide free use for up to 512MB db capacities if you don't want to deploy your own MongoDB server. Then it's $15 - $20 a month per GB complete with the Oplog capabilities (real-time, redundant MongoDB). And not only that, if you connect your data to Mongodb, you can easily use something like Meteor.js to create something to manage your game's backend data if not for something else like a scoreboard, user account management, and such!

  • Thanks guys, the function object was the answer. ramones - if I move that in there, the Text object won't initialize. So I called a function to create the Text object and initializing it upon creation works fine.

  • Well, I'm setting multidimensional array values from a JSON file to a C2 Array object:

    Take something like this for example:

    {
    	"c2array": true, 
    	"size": [3,2,1], 
    	"data": [
    		[
    			["title"],
    			["desc"]
    		],
    		[
    			["Frog"],
    			["Very green"]
    		],
    		[
    			["Camel"],
    			["Very yellow"]
    		]
    	]
    }
    [/code:30q6fhyr]
    
    I have something like this to load it up:
    
    [code:30q6fhyr]
    [On Start Layout ] -> AJAX -> Request words.json (tag "words")
    [On "words" completed] -> Words (Array) -> Load from JSON string AJAX.LastData
    [/code:30q6fhyr]
    
    Now I'm trying to use the data in this array in a Text object that I've programmatically spawned:
    
    [code:30q6fhyr]
    [On Start Layout] -> System -> Create Text on layer 0 at (200, 200)
    [On created Text]
        [Words is empty]
        [else]
            [Text] -> set text to Words.At[0,0,0]
    [/code:30q6fhyr]
    
    Using the .At() function, I'm only getting a value of "0" and not the text from the multidimensional array. Anyone know why this is so? The JSON data appears in the array viewer in the debugger.
  • ramones - thanks for the tips, I'll try these!

    LittleStain - Thanks for the suggestions. I'm not sure myself. I'm still figuring this out - I'm trying C2 again so I'm still getting settled with this WYSIWIG interface. Ideally, I'd like to show, up to which characters typed by the user matches the target word then break when the user enters a character that doesn't match up.

  • Hi,

    I've got 2 instance variables that both has String that I'd like to make a comparison of. I'm trying to make one of those typing games that take in the latest character typed and sees if the last character of the target word matches up. So I looked up the Regex function and I'm trying that out, but how do you enter the regex? Like for example, RegexSearch(). This takes in a String, Regex and Flag as parameters. Any clue as to how I can use this to search up instance var A using instance var B as a regex value? I'm a little confused as how the formatting goes.

    So I'm guessing I'm looking for something like:

    RegexSearch(InstanceVarA, /^InstanceVarB/, flags?)
    [/code:tjmg3i0q]
    
    So in JS, something like:  
    
    [code:tjmg3i0q]
    /^searchingforthisterm/.test("I am searchingforthisterm")
    [/code:tjmg3i0q]
    
    And is there a function to get the last character of a String?
  • As what the title says! I'm curious about this one. Has anyone tried this instead of the usual ad networks like AdMob etc? I'm talking about maybe using one's Amazon referral links as an ad banner, or maybe another shopping service out there that has an affiliate program - I don't know, like Rakuten, or Udemy, or even something like TripAdvisor? And how has it worked out for you?

  • Yes, something like that! Thanks for the example.

  • I suppose this'll work. Is there an equivalent of the clearTimeout(timer) part within in Construct 2 though?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hmm it seems the wait is fixed at 1 sec. Is there a way to reset the wait counter (count back from 0) whenever a keypress (within the set timeout) is made?

  • Ah let me try that. That's a subevent no? And this subevent acts like a nested condition?

  • The title sounds off. Ok, here's what I've got. I'm detecting keyboard input from the INPUT box in the event sheet. So it looks something like this:

    On Text Change -> Wait for 1 sec and do my action here...

    This isn't what I'm looking for of course as every time I input a key and thus, a text change is detected, it fires accordingly. So if I type up "hello" quickly, it'll run the action 5 times (there are 5 letters).

    So I'm looking for a way to detect changes on the text box but only fire my action once given a certain time period where no more changes are detected. So if I type up "hello" quickly, it'll fire the action only 1 time. So in JS, it's something like this:

    var timer; 
    var interval = 3000;       // Delay in ms before the action will run
    
    $('#inputbox').keyup(function(e) { 
        if (timer)
            clearTimeout(timer);
    
        timer = setTimeout(action, interval); 
    }); 
    
    function action() {
       //My actions here
    }
    [/code:9lualxyu]
    
    Is there something of a rough equivalent to this that anyone knows about?
admir's avatar

admir

Member since 3 Aug, 2012

None one is following admir yet!

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies