foolberry's Forum Posts

  • Sure. There are lots of possible examples.

    Scales - where the more weight you put on an object caused it to move down.

    Pistons - moving up and down under physics - but never moving to the left or right.

  • It did seem a little clunky.

    In an ideal world we'd be able to pass an object into a function (as if using a pointer). Not sure how that would work with C2's architecture. (I guess NOT)

  • Looks like that is how it works.

  • How does the picking work with functions? If I've picked an instance and then call a function which refers to that type, will it use the picked type?

    I'll give it a go and find out I guess.

  • Is there a way to do this? Say that I want an object to have physics in along the x-axis, but always have the same y-axis position - as if it were running on a rail.

    I can't find a way - and hacking it through setting Y every frame has nasty results.

  • Good news. Thanks for digging that one out.

  • I forget the exact formula I used, but I did something like:

    volume = -(distance(object.x,object.y,player.x,player.y) * somefactor)

    If somefactor is higher, the sound will fade out 'faster'.

    This is the exact formula I use as well. However note that the distance is in pixels so if somefactor == 1 then the sound will fade out very quickly. A good value of somefactor is 0.01

    For readability I write it as a divide...

    volume = -(distance(object.x,object.y,player.x,player.y) / somefactor)

    With somefactor = 100

  • People don't have time to make tutorials with pictures for every question that people have, unfortunately. You are going to have to work some elements out yourself.

    You want to make a jump where the height jumped is dependent on how long you have been holding the key down.

    This is done in two stages.

    Stage 1: find out how long the player has been holding the button down.

    Stage 2: Use that to determine how high the jump should be.

    So that sounds easier now. To do stage 1, you need to use the System.time expression when the key is pressed - store it in a variable. When the key is released you can use the System.time expression again to get the new time, subtract the old time (which you stored in a variable) to get the length of time the key was held.

    To do stage 2 depends on how you are doing a jump. Are you using the platform behaviour for example. Anyway - hopefully you will know how to make a jump. All you have to do is use set the value of the jump height using the value you obtained, probably with a multiplier, probably also clamped to sensible values.

    Hope this helps.

  • Dammit - ramones got there first.

  • Putting the opacity change stuff into a System->OnLoadingFinished makes it work.

    Not quite sure why - but it feels like it's picking all the families first before the red ones have been created. Perhaps when you create a sprite it puts it in a list and creates at the end of the frame.

    Ashley may be able to shed some light on it.

  • I don't believe the accelerometer works on cocoon yet. That isn't anything to do with C2 - it's a cocoon JS problem.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you find it overwhelming (and it can be) then you might want to consider making something more simple before doing an adventure game of that type. eg. a hidden object game would be a step along the way to that without having to deal with all the complexity at once.

  • I don't know if there's a tutorial. But as with anything else in C2 or any other programing (or indeed in life), it's a matter of breaking the problem down into smaller chunks.

    Each of the locations in that game could be represented as a different layout. And each hotspot within the location could be represented as a sprite.

    As sprites they can be clicked on and animate and spawn other sprites or text boxes. And from there, you could load up other layouts, ie move to another location.

    I think you could get a simple and ugly version of that up and working fairly quickly.

  • This is great. Nice and fast, feels responsive.

    It's nice to be able to make this sort of game which is no longer feasible commercially for consoles - and yet is still loads of fun to play.

  • Beautiful!