valerypopoff's Recent Forum Activity

  • Awesome !

    Duration = Framerate independent ?

    Now it is in version 1.0

  • Due to the way preview mode works in C3 loading local files has to be done slightly differently. This is one of the few differences in the runtime in C3. Instead of using "myscript.js" directly, call:

    var realUrl = this.runtime.getProjectFileUrl("myscript.js");[/code:hpel1tob]
    
    That gives you the real URL to request that will work in both preview and export.
    

    Cool, thanks, that worked!

  • In Construct 2 I could add myscript.js into project files and include it into a project on runtime (with a plugin for example) by doing this:

    var myScriptTag=document.createElement('script');
    myScriptTag.setAttribute("type","text/javascript");
    myScriptTag.setAttribute("src", "myscript.js");
    document.getElementsByTagName("head")[0].appendChild(myScriptTag);[/code:21b9xvid]
    and it worked both in preview mode and on export. But when I add [b]myscript.js[/b] into project files in Construct 3, it's no longer accessible in a preview mode and gives 404. But it works fine on export.
    
    What should I do to access a project file on runtime in a preview mode?
  • Press F12, reload the page and check the error console. This is almost always just that you forgot to upload some files, or the MIME types aren't set up correctly on the server (see the manual).

    I'm experiencing the same thing. Internet Explorer. Console says SCRIPT5: Access is denied

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In game I am creating dozens of enemies and in subsequent events or sub events I am changing their instance variables, positions and pinning stuff to them etc at the point of creation. and as far as I can see everything is working well and smoothly.

    As long as I understood and figured from numerous experiments, you sure can change instance variables, positions and pin stuff to Objects you've just created. Even in subsequent events or sub events. What you can NOT do in subsequent events or sub events is pick form those objects you've just created. Not by «Pick...» actions, nor by conditions, like, "If Object is visible...".

  • Created objects are accessible after the next top-level event

    Mother. Of. God. Is this documented anywhere?

    I've been trying to figure out what's wrong for, like, days. I accidentally figured that "Wait 0 seconds" solves the problem but I didn't know why.

    Thanks. I guess.

  • i think should be runtime.vars[],i.ll test

    So, did you try it?

  • I figured ReadExecutionReturn expression of this plugin works wrong. It only returns strings. If you try to return a number, for example, it crashes.

    Here's the link to a corrected plugin: https://drive.google.com/open?id=0B72lM ... 2daZnBJN3c

  • Awesome !

    Duration = Framerate independent ?

    In this version of a plugin it assumes that the frame rate is 60. If it's not, it will work incorrectly.

  • Hi, I'm working on Ease plugin here:

  • Change any value or parameter gradually with easing effect.

    Move objects around with easing. Change the sound volume gradually. Smoothly change an opengl effect parameter. Gradually change variables. You name it.

    Easing is frame rate independent since version 1.0.

    Demo

    Sample.capx

    Ease plugin v.0.1 for Construnct 2

    Ease plugin v.1.0 for Construnct 2

    Ease plugin v.1.0 for Construnct 3

    How it works

    1. Create a function that changes any value. Set this value to Function.Param(0)

    2. Create Ease action and pass the name of the function to it

    3. You're good. Once Ease action is triggered, it starts calling Setter function every tick with a new parameter taking into account Easing effect.

    Actions

    Ease — starts easing

    Conditions

    In ease — checks if easing is in progress

    On finished — triggered once easing is finished

    Expressions

    Not ready yet

  • Now you can use

    if (window["c2_callFunction"])

    window["c2_callFunction"]("name", ["param1", "param2"]);

    to call function in your plugin

    Reference https://www.scirra.com/manual/149/function , "Javascript integration" section

    Thanks, that helped!

valerypopoff's avatar

valerypopoff

Early Adopter

Member since 7 Aug, 2016

Twitter
valerypopoff has 34 followers

Connect with valerypopoff

Trophy Case

  • 8-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

10/44
How to earn trophies