R0J0hound's Forum Posts

  • Variable=1 and the else should be subevents of on button pressed and it should work.

    You can also toggle the variable between 1 and 2 with one event:

    On button pressed

    --- set variable to 3-variable

    Just be sure the variable starts as 1 or two.

  • Fonts mess on different systems, because different browsers and operating systems do things differently. This is a web wide issue. At least that's what I gather from an Internet search.

    You could create a bug report for it. Maybe it can be corrected?

  • It's hard to give improvements with just videos. Here's a possible model:

    Joints at all the normal spots, and some range of motion limits. The springs are used to encourage extended legs and flexed arms. That encourages a more bent over posture which keeps the joints in the middle of their ranges of motion.

    Here is a possible implementation:

    https://dl.dropboxusercontent.com/u/542 ... dness.capx

    The feet angle could probably be done manually instead of being physics based.

    It may not be usable other than maybe giving some ideas. I does need a lot more tweaking.

  • A curve can be approximated by a bunch of lines so you either can do that or another way would be to use a tilemap with 1x1 tiles.

    If you make the size the same as the canvas and loop overall the pixels and set the tile if it's a certain color after a pretty good delay you'll have it colliding with what you drew.

  • You can also use the distance expression, after all it's the same equation.

    distance(0,0,velocityX,velocityY)

  • If you want a line with physics then instead of using this plugin use a Sprite to be your line.

    Make the origin on the sprite on the center left. Then position the sprite to the first point. Then set its angle toward the second point and make its width the distance between the two points. The height of the Sprite is the line thickness.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • % gives the remainder after a division. It can be used to loop the numbers:

    0 % 3 = 0

    1 % 3 = 1

    2 % 3 = 2

    3 % 3 = 0

    4 % 3 = 1

    5 % 3 = 2

  • After a wait the object scope is re-evaluated. The newly created sprite is still picked but all the family will be picked because you didn't explicitly pick any family instances.

    Consider the three examples below. When you don't explicitly pick an object type it assumes all of them are picked. The first two examples both just destroy all the family instances after the wait. The third picks a family instance, so that is remembered after the wait, and only that instance gets destroyed.

    start of layout
    --- create sprite
       blank-sub-event
       --- wait
       --- destroy family
    
    start of layout
    --- create sprite
       pick all family
       --- wait
       --- destroy family
    
    start of layout
    --- create sprite
       pick family instance 0
       --- wait
       --- destroy family[/code:2y9fpuz1]
  • In the case of that library here's the text to run that will load the library and run the example code from the libraries webpage.

    "$.getScript('NoSleep.js', function(){
    document.noSleep = new NoSleep();
    
    function enableNoSleep() {
      document.noSleep.enable();
      document.removeEventListener('touchstart', enableNoSleep, false);
    }
    
    document.addEventListener('touchstart', enableNoSleep, false);
    });"[/code:3ch80xxw]
  • Here are two posts that explain how picking works with created objects:

    It doesn't explicitly mention families but the created sprites aren't added to the family to be pickable until a top level event as well.

  • Wait is dt dependent so it won't work when timescale is 0. You could set the timescale of objects individually. Or you could use the wallclocktime expression to measure the time passed since it's not affected by timescale. Use wait signal instead of wait:

  • The action does exactly what it says, it executes some snippet of JavaScript. It's mostly useful for simple JavaScript stuff.

    It's not quite sufficient to easily use some JavaScript library. First, importing the library into the files folder isn't enough to make it usable. for that it needs to be loaded in one of three ways:

    1. Edit the exported HTML file and add the library with the other js files.

    2. Load it after the fact with the jquery.getScript function.

    3. Make a plugin and put the library in it's dependencies section of the edittime.js.

    One is a bit akward to use for testing, but it is the normal way to include JavaScript files in HTML.

    Two is slightly tricky since loading a library is asynchronous so the library can take time to load an may not be usable right away. The syntax is $.getScript(filename, callback) and callback is a function to call when the library is done loading. If you want examples of such a thing search my posts for JavaScript.

    Three is the reccomended way by making a plugin. Doing it with a plugin may make some things more straightforward than the other two methods.

    So then after you get the library loaded how you use the library depends on the library.

  • Why is it not intuitive? If you set the effect parameter before the wait it would be done then in the event.

  • Hmm. Maybe calculate the angle between the player and enemy with

    ang = angle(player.x,player.y,enemy.x,enemy.y)

    Then use an "angle is within" condition

    ang is within 90 degrees of wind.angle

    --- player is upwind