cow_trix's Forum Posts

  • Nevermind, got it!

    Psuedocode:

    local number token = 0

    Repeat (tokencount(textbox.text, newline) times

    -> Push back Array (tokenat(textbox.text, token, newline)

    -> Add 1 to token

    EDIT: instead of the local variable you can actually just use loopindex

  • Hey folks. Quick question: can anyone come up with a way to do the following:

    • Have a text box of n lines
    • Iterate through each line, and fill an array with said line until no more are left

    This would be trivial for any other programming tool but I can't seem to find anything in C2 which can do it easily.

  • Hey hey, just a thought for an option for the TiledBackground object. The ability for something to be "infinitely tiled", that is extending infinitely in every direction. Note that I don't mean the background doesn't scroll - that's easily achievable.

  • Hey guys. So the torrent idea is great, but would it be possible to get a magnet link as well?

  • Hey Austin. While that does stop CocoonJS from complaining, it also makes the scaling not work and the plugin cannot connect.

    The little white sprite in the top left of the screenshot is all that appears when a leaderboard tries to display:

    lrtw.net/documents/misc/2013-07-22%2015.24.16.png

    That little box is scrollable, its just the logo and:

    "Loading Leaderboard... Debug Mode"

    The leaderboard fails to load, and high scores are not submitted. The condition "Clay.IO is ready" is not true.

    CocooonJS spits out the following error:

    Clay.IO has not connected to its backend yet. Use Clay.Ready() before this call, or email us if you think the issue is on our end

    Keep in mind this all works absolutely fine for the desktop version.

  • Now Ashley can correct me if I'm wrong, but I believe C2 just uses JavaScript's logic and datatypes. Now JS is an untyped, or dynamically typed language. That means that you generally don't declare what type a variable is going to be, it's taken care of behind the scenes. This makes predicting round of errors and precision errors a nightmare because it's all guesswork on what type JS is choosing at that point in time. As a general rule, JS will pick the most suitable type, so:

    "asdasd" = string

    65161 = int

    65651651684651654165168416517165141651 = long

    1/3 = double

    1/4 = float

  • Hey guys, love your work. I believe Clay.IO breaks the latest version of CocoonJS. I get the following error when adding the plugin to any project:

    JavaScript Exception: (File:'c2runtime.js' Tag:'script') TypeError: Cannot call method 'addEventListener' of undefined

       at instanceProto.onCreate(c2runtime.js:20559:68)

       at Runtime.load(c2runtime.js:7814:14)

       at window.createCocoonJSRuntime(c2runtime.js:10172:12)

       at c2runtime.js:46513:1

       at c2runtime.js:46515:3

  • It's very useful to get into the habit of coding resolution-independently. Set all UI element's positions by events, and always use some form of WindowWidth/Height or LayerLeft/Right/Bottom/Top in such a way as to not matter what the screen resolution is. For instance:

    Every Tick

    -> Set position of Sprite to WindowWidth/2, WindowHeight/2

    This will ALWAYS, independent of screen resolution, make the sprite sit at the center of the user's screen.

  • I don't believe there is. However, WebGL layer effects can be altered in runtime. This would be your best bet.

  • I'm not sure what you're trying to achieve. Could you post a .capx?

  • Never heard of it. Could you explain what it is supposed to do?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • blackhornet 's link will probably be fine as well. Mine is working too now, just had to give the server a second.

  • Check this out, see if it makes any more sense.

  • There is a pathfinding behavior that supports this functionality.