Robsta's Recent Forum Activity

  • Works great, thanks

  • Strange, I remember using "Restart Layout" before and it did trigger the "on start of layout". I recall creating an infinite loop this way.

  • Can you "Pick Nth" to pick the last instance?

    I'm having a similar problem, I'm trying to select a specific overlapping sprite, but it defaults to selecting the sprite with the lowest UID (or appears to), while I want the one with the highest UID. If I use "Pick Nth" with N = 0, I get the card with lowest UID, N=1 gives me the card with 2nd lowest UID etc... but I want the card with the highest UID, and the number of cards picked isn't set.

  • That was what I would have suggested originally, but I noticed the template game he's basing it off of doesn't use an invisible box, it just has every frame of the animation have the exact same collision box.

    (doesn't have to be "bigger", just has to have every single from of every animation have the exact same collision box.)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I got that it's the same as AJAX from reading the docs, but I'm not sure how to do it way AJAX either. Does that mean I need add it to the header in the exported .html file? *Tries it* Nope that didn't seem to do anything. *Reads link from AJAX documentation a little closer*

  • I took a look at it and it appears that your problem is not in the export of the image, rather it's because your collision box for your animation is not set up correctly, thus resulting in your character falling every time they reach a certain animation frame. Firstly, this results in the running animation to stop immediately and the falling animation to start before the running animation is complete, secondly, since you can't jump while falling, it means that the jump command doesn't work approximately half the time (while you're falling).

  • So I've read the documentation about sprites and ajax objects, but I'm still a little baffled on how to load an image to a sprite from a different domain.

    Part of this bafflement is that if I write:

    <img src="http://crispme.com/wp-content/uploads/88456.jpg?pass" alt="Smiley face" width="420" height="420">

    In an html file in the same location as my construct 2 project, it works just fine, but if I try to load the image (http://crispme.com/wp-content/uploads/88456.jpg?pass) it doesn't work, nor does it come up with an error in the console log.

    Does HTML have some way around this cross-domain permissions thing? But the more important question is how would I be able to load an image into my game cross-domain?

  • Hi, I'm Robert

    I'm a C++ programmer made web-programmer by means of the marketplace. I found out about Construct 2 because I believe html5 is the way of the future of mulch-platform browser gaming, and in my search for the best html5 engines, Construct 2 was one of the ones I found.

    I found that I could make rapid prototypes in Construct 2, even though I didn't feel like I was using the extent of my programming skills, it's a good step towards web development. Then I started looking at plugin development for Construct and felt more at home in a code-like environment.

    My current Construct project is to make a plugin that fully integrates the Synaptop API into Construct so that I can create games and apps in this engine and run them with full Synaptop functionality.http://www.synaptop.com

  • What appears to be the problem is that I want asynchronous events to be called synchronously, which it appears is impossible, so I made a workaround for it (called the asynchronous event every time the value I want to return can change).

    The plugin and getting it to work on other computers is a little complicated to be posting (or parts there of). But I did find a workaround for this specific instance. Hopefully I won't need to use synchronous events much in the rest of the plugin.

  • I've been looking into this problem for a bit now, and I'm pretty sure the cause is that javascript isn't waiting for the external function to finish before it executes the code that returns the value to Construct; therefore while I tell it to find out the number to return, then return the number, it actually returns the number, then figures out what number it was supposed to return.

    Now what I need to know is the solution.

  • Bump for new question.

  • aha, I think I solved it.

    What I had to do is follow the kongregate example and declare my own runtime, so

    in function() (the big one that encompasses most of runtime.js)

    declare

    var myRuntime = null;
    var myInstance = null;

    Then in pluginProto.Instance() set the values to

    myRuntime = this.runtime;
    myInstance = this;

    Then proceed to use these variables where needed.

    myRuntime.trigger(cr.plugins_.Foo.prototype.cnds.Foobar, myInstance);
Robsta's avatar

Robsta

Member since 17 Jan, 2014

None one is following Robsta yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies