jsutton's Recent Forum Activity

  • monaca.io is the cat's meow. Makes Intel's old XDK uploads look complex by comparison. I would highly recommend it to anyone. (oh, and it also makes storekey adds/changes extremely simple)

  • monaca.io

    Took me a whopping 15 minutes from upload to pending publication.

  • I have used Intel XDK several time, it was pretty simple. Phone gap keeps giving me a debug apk. (don't tell me to unclick debug or that my key is wrong, etc....they are correct) I've been at this for 4 days and am getting pissy lol.

    Someone should write an app that has step by step instructions (because the key issue is a huge pain in the rump).

    I mean seriously, it took 2 days to write the app and now 4 days to publish...nutty.

    Any thoughts would be great. Thanks J

  • As long as the triggering event On Completed with a tag is run, within that event, AJAX.lastdata will give you the data from that specific tag's request. It doesn't matter if it comes back before, after, or at the same time as another AJAX request.

    This addresses my question...and I'm not sure that's 100% correct and trying to verify.

  • Right, but if I call ajax 1, and ajax 2...and the data returned is ordered 2,1...and returns at the exact time.

    I'm already figuring this out a little better, and I'm 99.9% sure the answer is...

    When construct executes based on tag xyz, it does not care whether the lastdata matches the tag xyz....it just goes by what's in the lastdata.

    No biggy, but I'll have to add a column in phpadmin and use it as an criteria for

    example:

    on "xyz" completed &tokenat(AJAX.LastData,0,"|") = "xyz" then do whatever

  • I have found nothing on this and should be fairly simple.

    Say we have 2 ajax requests that trigger at the same time, does construct ajax.lastdata have an identifier tag for the lastdata or is that something that should be added/compared via the php/sql side?

    Meaning, does construct care if the data matches the request (I assume not).

    Unless someone knows, I will start planning to put identifiers into all my ajax requests.

    Thanks in advance!

  • As almost every time I ask a question, simple answer...

    I changed the echo on .php to 111 and compared to 111

    Closed

  • I have about 50 ajax requests in my game, all work fine (so no issue there).

    My question is this: When Ajax is called and returns "None" is there an easy way to compare this for a condition?

    I have tried:

    tokenat(AJAX.LastData,0,"|") not equal to "None"

    AJAX.LastData not equal to "None"

    AJAX.LastData not equal to 0

    AJAX.LastData not equal to ""

    (on a side note, null returns in ajax are squirrely, sometimes the have a space at the end, sometimes not depending...and no rhyme or reason I can tell)

  • Solved:

    The above conditions were fine (first time I've used loopindex).

    The action needed to be str(array.at(array.curx,15))...likely don't need the str()

    The rest of the issues were all me, per the norm

  • My best guess at answering my own question follows: (it doesn't work and seeking guidance)

    Array, 400 width / 30 height / 1 depth

    Text Box

    Condition -

    Array compare at XY: value at (loopindex,0) =8 and Array compare at XY: value at (loopindex,11) =Dog

    Action -

    set text to str(loopindex,15)

    I'm not sure loopindex is the right way to go...especially in the text ??str(array.curx,15)??

    Suggestions appreciated.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Got this down to 2 functions, variable, and a call...much happier with performance.

    1. Call function 1...add 3 to variable (allows me to set the start position for first chat post) then call function 2

    2. Call function 2 ...create next chat below first chat post, add 3 to variable, call function 2 again while the variable is below 150, else set variable to 2....ie, stop. (this is wrong I know, but it's creating a loop [manually] and I have no clue how to code that properly)

    Still if you wouldn't mind posting how the 2d array tokenat would be written and how the loopindex %3 (also the trigger events) would be written.

    Thanks for the hand holding!

  • TBH, not sure how to post a project file (also I'm 10k events into this, 2 years of work).

    Would you mind posting how you would parse the tokenat to a 2d array, I can figure it out if I know that trick.

    Same for the the loopindex %3, not sure where that would be placed.

    [As an update I did switch out to using sprite font and it is much much faster than textbox and cut down the number of sub-events to 6...still would like to know loops better, that seems like handy stuff and not much in the way of advanced tutorials on the web]

jsutton's avatar

jsutton

Member since 31 Mar, 2015

Twitter
jsutton has 1 followers

Trophy Case

  • 9-Year Club
  • Forum Contributor Made 100 posts in the forums
  • RTFM Read the fabulous manual
  • Email Verified

Progress

12/44
How to earn trophies