AllanR's Forum Posts

  • Maham Imtiaz

    since there are 3 guns, it doesn't know which gun you are referring to when you try to set the angle.

    event 27 will have all the guns spawn a bullet, but events 28 to 30 still have all guns picked so it will probably use the first instance's angle.

    you need to add a "For each Firegun", then have each one spawn a bullet separately so you can check the animation frame and set the angle properly.

  • FacuLNF

    no, BBCode is only available in C3.

  • Spela

    multi touch is a lot more effort than single touch.

    in my experience, the best way to handle multi touch is to create a sprite called touchpoint and use that to track each touch. You create one on every touch start, update where it is every tick, and destroy it when that touch ends. that way you know exactly where the touch started, how long it has been in touch, and can control what it is allowed to do, what it should ignore, etc...

    I made a quick sample, where I copied parts of my standard multi touch routines, so it is doing slightly more than what you asked for, but might be useful to see how I like to do it.

    https://www.rieperts.com/games/forum/multitouch.capx

  • AnD4D

    When I transfer data back and forth to a database, I use a record delimiter and a field delimiter

    so, I would have something like:

    Bob|25|Male|Tall/Mary|24|Female|Short/Alex|48|Male|Medium

    then have a double loop, first to pull out a record (Bob|25|Male|Tall)

    and then a loop to pull out the fields...

  • Aguamoose

    ok, re-read your post, and I think I misunderstood you...

    I tried again, this time I set the background layer parallax to the same as the foreground, but still with scale rate set to 0.

    then I move the background image a scaled amount based on the layout zoom (starting with 50% at a layout scale of 100%)

    so, try thins one...

    https://www.rieperts.com/games/forum/zoom2.capx

  • Aguamoose

    the problem might be the background hitting the edge of layout. Turning on Unbounded scrolling will let it move freely, without it being limited by the boundaries. But then you have to make sure the 50% parallax layer extends out far enough that people can't see the edges...

    https://www.rieperts.com/games/forum/zoom.capx

  • Try Construct 3

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

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

    I don't know how Soul Knight works, but if you want to use random seeds so that people can share a random level they like, then you will need the noisejs plugin for C2. And you will want to read up on perlin noise.

    https://www.construct.net/en/forum/extending-construct-2/addons-29/plugin-noisejs-71474?kws=perlin%2bnoise

  • ayomon

    that game is perfect for the physics plugin - you can give the balls different density and elasticity settings...

    https://www.rieperts.com/games/forum/plinko.capx

  • I am pretty sure it finishes one event completely before it starts the next - unless you add "Wait x seconds" to intentionally delay actions.

    I have heard some people say that triggers can happen out of sequence, but I don't know if that is true or not.

    EDIT: from the manual:

    However, triggers are an exception. See the green arrow to the left of Keyboard: On Space pressed from the previous example:

    Note the trigger.

    This indicates the event is triggered. Rather than running once per tick, this event simply runs (or "fires") upon something actually happening. In this case, the event runs when the user hits the Spacebar key on the keyboard. It is never checked any other time. Since triggers run upon an event happening, they aren't checked in top-to-bottom order like other events. This means the ordering of triggers relative to other events is not important (except relative to other triggers of the same type, since triggers still fire top-to-bottom).

  • jobel

    I think that should work fine. It never occurred to me to try that, but it follows the rules. Eventsheets are executed top to bottom.

    like AySquirrel said, a container would be a good idea because then when you pick the main sprite, the spawned sprite will automatically be picked as well. And when the main sprite is destroyed, the spawned sprite will also be destroyed. (any objects in a container automatically get created when the container object is crteated).

    another way to do it (without containers) is to have TestSprite spawn TestSprite2 inside the first repeat (event 2). That way it will create then in pairs, rather than all the TestSprites first, and then the TestSprite2s afterwards.

  • Alon

    you could use "On frame changed" to take care of the timing, under that take a snapshot of the canvas (and increment the image count variable), then use the browser object to download...

    in looking into the options, I ended up making a working sample... so here it is:

    https://www.rieperts.com/games/forum/snapshots.c3p

  • jobel

    when objects are created, Construct does not finish adding the new objects to the internal lists until the next top level event. So, when the object is created, it will stay picked for all actions and sub events directly under it. But you can't loop through them until the next top level event, or you can add a "Wait 0 seconds" action before the for loop to make that code run at the end of the current tick.

    the only other thing you can do is pass the UID of the object to a function, and pick the object by its UID - then you could modify each object as it is created...

  • WRS

    instead of using the start x and y in the distance calculation, use the Last x and y (and the current x,y). Every time you check the distance traveled, update the Last x and y.

    distance(lastX,lastY,player.x,player.y)

    lastX = player.x

    lastY = player.y

  • beguinner

    this is how I would do it - with a single tiled background image made to look like multiple objects.

    if you need actual separate objects, it gets a little trickier - you have to wait until the touch/mouse has moved enough to create the next object, and decide what happens if the user doesn't draw in a straight line...

    https://www.rieperts.com/games/forum/DrawLine.capx

  • Taximan

    this is a sample I worked on a few months ago - it uses physics that ROJOhound came up with.

    https://www.rieperts.com/games/forum/waterfloat2.capx