Toddler's Forum Posts

  • The whole construct 2 Admob thingy has been a problem for a while now...

    I have long given up on Construct 2 and Admob integration.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Is there a plugin [this is definitely not a behavior but a plugin] that can detect what is the current vertical and horizontal mouse direction ?

    For example:

    mouse.getHorizontal :: returns "left" or "right"

    mouse.getVertical :: returns "up" or "down"

    I can handle the javaScript code:

    addEventListener("mousemove", getMouseDirection, false);

    var xDirection = "";

    var yDirection = "";

    var oldX = 0;

    var oldY = 0;

    function getMouseDirection(e)

    {

    //deal with the horizontal case

    if (oldX < e.pageX)

    {

    xDirection = "right";

    }

    else

    {

    xDirection = "left";

    }

    //deal with the vertical case

    if (oldY < e.pageY)

    {

    yDirection = "down";

    }

    else

    {

    yDirection = "up";

    }

    oldX = e.pageX;

    oldY = e.pageY;

    console.log(xDirection + " " + yDirection);

    }

    But I do not know how to "package" this into a plugin, does anyone know how to pack this into a plugin ?

  • Is anyone still using this Addon ?

    I checked out the example and I see no real advantage over the native scrollTo effect beyond the "catching up to the player" effect while the native one follows directly with no lag.

    What are you using this for that the native scrollTo can't do ?

  • First of all, thank you.

    I appreciate the effort you took to type out all these codes, really thank you.

    However, it is just not the same, I do not know how to call that function from within JavaScript, this only works for hovers and stuff, it's not like I can call that CSS function from JavaScript when an enemy is attacked shake the enemy right ?

    Second of all, even if that were possible, that CSS alternative is just no match for the real deal in this add-on.

    It not only have control over Magnitude and Duration [Duration is a big deal], you also have the almighty "Reducing Magnitude" mode.

    AND AND AND it have the ability to enforce its position at the end !

    This is truly the most powerful add-on for object shake, I just wish I can isolate the add-on's code that does this, there are so many wrapper codes in the add-on to make it into an add on :-(

  • This is such a useful plugin, can someone PLEASE convert this to a basic JavaScript function like:

    shake(object, are the rest of the argument this add-on requires);

    So that we can use it for everyday JavaScript DOM elements outside Construct 2 ?

  • Hi, not sure if this is a bug, but it can be replicated.

    Apply the behavior to a button .

    Make it so that when you click it it shakes [Enforce Position].

    If you click and wait for the shake to end, the position will indeed be respected.

    Now...

    Click it again and again really fast.

    Soon the button will no longer be at its original position even though Enforce Position is on.

  • Man I hate to put it to you like this man but I am SICK of your condescending attitude.

    First of all you should thank the people here who have been helping you improve your plug-in instead of constantly berating whether they can pick up a spoon every time they are asking a question.

    I am so SICK of your attitude that I really hope I can restraint myself from replying to your thread ever again.

    Frankly, you are not that smart yourself, your code is an extrapolation of at least three existing construct 2 plug-in on further inspection and you did NOT once give ANY credit to the developer you rip the idea off of, I am not going to name names, you really should do the right thing yourself before you got found out anyways.

    ========================================================================

    One:

    valerypopoff

    I don't think that you actually meant polymorphism. Polymorphism means something else.

    ========================================================================

    First of all, it means EXACTLY what I say it means, I said it is a form of "extends", let me just bring out one example, this applies to any programming language that support it and not just AS3.

    adobe.com/devnet/actionscript/learning/oop-concepts/polymorphism-and-interfaces.html

    Notice method two, the usage of "extends" to create Polymorphism.

    So, to use the same attitude you have been using towards everyone here, do you even know what Polymorphism is ?

    The audacity to say it have nothing to do with extends is not only incorrect, but misleading to anyone who is trying to learn programming beyond drag and drop Construct 2.

    You are not really as smart as you paint yourself up to be so I would suggest your tone down your baseless constant need to put people down.

    ========================================================================

    Two:

    valerypopoff

    I don't know what you mean by "make instance of a sprite HAVE an instance of js class". You certainly can if you just imagine that this is the case. Create two instances of a sprite. Create two instances of a js class. Done. They HAVE each other. Do whatever you want with them.

    ========================================================================

    That would defeat the very purpose of object orientated programming, that would defeat the whole reason why I would even create a class for a sprite in the first place which is what your plug-in will be use for.

    The idea is for every new sprite/object spawned, it will have its own base class during runtime, not just and only during editing.

    You mentioned your plug-in is to be used for the "view-model-controller" model, I hate to break it to you man, but since you are absolutely insidious on anyone who even ask you a question, any question at all and have seemingly no respect to your user at all, I am going to give you a feel of your own speech and to you, do you even know what true view model controller actually is ?

    I have been programming using Objective-C using XCode and the way it works is the true assertion of the "model-view-controller" framework and your plug-in ain't it.

    Your plug-in could be used to extend a sprite, but seeing that your answer is first to insult my intellect and then proceed to say the most ridiculous answer which is manually create a class for each object during editing time, dude, all I am going to say is, you are really not as smart as you make yourself up to be and that is putting it mildly.

    I am done with your condescending attitude and I am going to restrain myself from replying from now on.

  • Thanks for telling me that you have creating html 5 projects from scratch.

    I use CreateJS and Babylon.js to do massive html 5 projects that isn't game based so I am not exactly "stupid" if that is what you are implying.

    And I can play sound in createJS JUST FINE without needing to upload to a server/proxy server.

    No I still DON'T see the point of construct 2 needing to be uploaded to a server or proxy server just to be viewable, it STILL doesn't make sense.

    What is it that construct 2 need that required a server situation ?

  • What exactly is construct 2 doing that NEED it to be uploaded for it to be viewable ?

    I type HTML code all the time and I don't see no need to "upload to a server" to view it unless I use offline CDN links and libraries.

  • valerypopoff, do you think there is a way to say for example, create a class on the *.js side and then make every instance of a sprite have an instance of that class ?

    Think of it as polymorphism, your "extends" so to speak.

  • File accepted.

  • valerypopoff

    To access Javascript Variable:

    JS.Value("global_variable")

    JS.JSCodeValue("global_variable")

    Both does the same thing, so...why ?

  • Updated.

  • Link removed.

  • JS: Call function:

    Expression: "global_variable_function"

    Result:

    ValerypopoffJS plugin: Error in 'Call' action

    ---------------------

    JS code: global_variable_function()

    ---------------------

    final.end is undefined