R0J0hound's Forum Posts

  • Waltuo

    Use the "begin path" action to not use any previous paths with the draw path action.

    Ex:

    move to (0,0)

    line to (10,10)

    draw path "black" 1.0

    begin path

    line to (20,20)

    draw path "blue" 2.0

  • I'm guessing the browsers themselves aren't checking those other buttons perhaps, the spec seems to allow it though. More than three buttons is non-standard so it's probably something more complicated like gamepads, but there doesn't seem to be any other way to access the mouse from js.

    I don't see any issue with giving beginners something new to learn, and in this case it's just a matter of using it like the example provided.

  • There are array editors, drawing programs, and some music players to name a few. The only complicated thing with your idea is recognizing the beer by a taking a picture of it's label. Even if you were just coding it with a typed language it's something you'd want to find some existing library to do for you.

  • glerikud

    Why not? A beginner just needs to copy the start of layout event, then any function called "click" will be called when a button is clicked, and the first parameter will be the button number.

    eli0s

    As blackhornet says it only works clicking outside of the textbox.

    blackhornet

    That's interesting. I only have a standard mouse so I couldn't test.I guess it depends of the mouse or something.

  • Sure, why not? The main one's I've seen that have come to mind are editors. but there isn't really any limits to what you can make. Did you have something you had in mind?

  • Why not just add or subtract one when you press the arrow keys?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 99Instances2Go

    I can't read your variables, but if you stored the direction to move for each grid in the flood fill step then it's just a matter of moving the enemies in the same direction as the grid they are on.

  • Look here:

    http://bavotasan.com/2011/style-select- ... -only-css/

    There are probably more resources online on what else you can change.

    Look at the css, all of it is in

    property:value pairs.

    You can then use the "set css style" action to set any of those properties.

    For a full list of css properties look here:

    http://www.tutorialspoint.com/css/index.htm

  • There are a few tutorials will various ways and a lot of topics on the subject. Maybe one of them is exactly what you're looking for, or at least give you a start.

    https://www.scirra.com/tutorials/search?q=inventory

    search.php?keywords=inventory&terms=all&author=&sc=1&sf=all&sr=posts&sk=t&sd=d&st=0&ch=300&t=0&submit=Search

  • If the loop is big enough it will eat up time. The idea I posted is a possible way to tune the length of it. Changing the numbers could give better results. In the end it's just a random idea. I probably would never use it, instead i'd go for the every x seconds idea.

  • Another idea would be to enable/disable the solid behavior for the stairs, and fall thru the floors. After a bit of head banging it works:

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

    The player is counting as falling even with slower speeds, but maybe the slopes are too steep. A solution to that is to only change the animation if the player is falling for a few frames.

  • Sam Mortimer

    Here's info about it.

  • The impulse of a collision is basically the change of velocity from before and after a collision. Using that info you can calculate it. Then you can use lerp or something to map the impulse to a volume.

    Here's one possible conversion:

    lerp(-1000, 0, min(impulse/1000, 1))

    which means when the impulse is 0 the volume will be -1000 dB, and when the impulse is 1000 or higher the volume will be 0 dB. Impulses in between will be between the two volumes. Tweak the numbers for different results.

    global number prevVelocityX=0

    global number prevVelocityY=0

    global number impulse=0

    on sprite collides with wall

    --- set impulse to distance(0,0, sprite.physics.velocityX-prevVelocityX, sprite.physics.velocityY-prevVelocityY)

    --- play sound at volume lerp(-1000, 0, min(impulse/1000, 1))

    every tick

    --- set prevVelocityX to sprite.physics.velocityX

    --- set prevVelocityY to sprite.physics.velocityY

  • Using regex for that doesn't sound like the most straight forward to me.

    First, the flag need to be "ig" instead of just "i". The "g" tells it to not stop at the first one it finds.

    http://www.w3schools.com/js/js_regexp.asp

    So then your expression would be:

    RegexMatchAt(gameSaveInfo,"fishCollectedUID:(\d+)","ig",loopindex)

    But, that doesn't give you the uid number, it gives:

    "fishCollectedUID:33" or something.

    You still need to get the number out of it. I guess you could use another regex for that.

    So it would look like this:

    repeat RegexMatchCount(gameSaveInfo,"fishCollectedUID:(\d+)","ig") times

    pick fish by uid int(RegexMatchAt(RegexMatchAt(gameSaveInfo,"fishCollectedUID:(\d+)","ig",loopindex),"\d+","i,0))

    --- fish: set invisible