R0J0hound's Forum Posts

  • 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?

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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

  • alextro

    The dijkstra algorithm is what your capx is doing and is the algorithm used it the article you referenced.

  • newt

    I'd imagine that'd be doable with an overhaul of expressions. My hypothetical would have it in mind. It's often hard to change an existing system to allow it, but a redesign can allow it. The freedom of my design is I'm ignoring all issues of backward compatibility, which Scirra has to deal with carefully.

    Animmaniac

    For that I was kind of imagining kind of a hierarchy of types or something. Limiting to common features is another thought, but I understand Ashley's point stated elsewhere where expressions can mean entirely different things for different objects, so it'd not work.

    object: uid
    |
    |--visual: x,y,width,height,angle
       |
       |--sprite: anim, frame
       |
       |--tiledbg: offset[/code:3p95f9kh]
    
    Another sloppy idea would be to either do nothing or cause an error if an expression was used that the object doesn't have.
    But basically my design is glossing over the problem by assuming pretty much only one kind of object.
    
    @rexrainbow
    The idea is similar, but I'd also like to explore the idea of not using UID's like we do now since they're a lot like pointers in c.  Using an array or dictionary is more in line with normal coding.  I like the picking system C2 provides and would like to design it so it acts pretty much the same.
    
    @99Instances2Go
    Those would likely be mitigated by being able to see what's picked in the debugger and being able to step through it a condition and action at a time instead of only a event at a time.  Advanced users do this manually either on paper or change opacity or something to visualize it when running the game.
    
    @newt
    Having "and" and "or" in the same event makes sense for simple stuff, but in other ways it doesn't seem intuitive to me.  C2's "or" event is already kind of like that to me.  I'm never sure of it's behavior when  two conditions of different objects are used, instead I have to verify what it does in events.
    In my design i'm probably side stepping the issue by making the expression based solution, often used in C2, easier.  Here are some possible solutions, but it probably needs more exploring because it should work with triggers and loops to...
    
    sprite: x<0
    or
    sprite2: x<640
    sprite2: x>320
    
    sprite: sprite.x<0
    or
    sprite2: sprite.x<640 and sprite2.x>320
    
    sprite, sprite2: sprite.x<0 or sprite2.x<640 and sprite2.x>320
  • When you say with itself it's confusing to me. The overlapping point just finds objects overlapping a point that's not associated with anything. You could save the uid of the object you got the point from and then after the operlap condition do a system compare to make sure the picked uid isn't the same as the saved one.