mekonbekon's Forum Posts

  • The following changes should do the trick:

    1. Change "sprEnemyTechnology.Bullet.DistanceTravelled=200" to just "200".

    2. Change the Bullet distance travelled condition from "=" to ">"; it's unlikely that the bullet distance travelled will ever exactly be 200 so if you only check for "=" it probably won't get triggered.

    Also, unless you intend the bullet to stop only if the player points are greater than 30 and it has already travelled 200, move out the "sprEnemyTechnology: Bullet distance travelled" sub-event from under the "Trigger once" event to the same level - that will ensure it stops as soon as it reaches 200.

  • Yep, definitely using the same software, just a different theme :-)

    You can add a new event and then drag it to the right to make it a sub-event but if you're finding that a bit fiddly, try this:

    1. Delete the repeat in your example.

    2. Select the for loop.

    3. Press B to add a blank sub-event.

    4. Double-click the sub-event and add a repeat.

    Hope that helps! :-)

  • If you want to keep it in one text object you can do it as follows:

  • If this is going to be an Android mobile game you would need to add the Touch plugin:

    1. Click anywhere on any layout to add an object, scroll down to the Input section and select "Touch".

    2. In the event sheet associated with the layout containing the hidden objects, click "Add Event" and add a Touch condition.

    3. Choose "On Tap Object" and select the hidden object to set the touch condition.

    When testing this on a computer make sure you have "Use mouse input" ticked in the Touch object's properties - it will then treat the mouse input as a touch input.

  • Do you have "Set angle" enabled on the bullet behaviour and rotate behaviour (or similar) added to the meteor? If so the rotate behaviour will cause the meteor's direction of travel to curve.

  • You're welcome :-)

  • This was the best I could do based on your example:

    dropbox.com/scl/fi/e1f1zabquujhzoiu6thzp/climbTilemap.capx

    The meat of it is in event 5. I have a variable on the player that records the tilemap UID when you start climbing; if the condition checks that the player is overlapping more than one tilemap it picks the nearest and checks to see if its UID matches the saved tilemap UID on the player variable. If it doesn't then the saved UID and movement modifiers are updated.

    Hope that helps! :-)

  • Ashley Of course! I'm an idiot. Thank you :-)

  • Bl4ckSh33p I might be wrong about this, but I think it's because when you click the button the animation change only affects the animations on instances of the Sprite object that currently exist - as new particles are generated the initial animation settings are used.

    To permanently change the animation you would have to do it in an "On created" condition for the spawned Sprite object.

    UPDATE: Yep, just modified your example - if you add a global variable string "id", on pressing a button set "id" to the button ID, and then Sprite|On created set animation to "id", it works as intended.

  • In a particle object's properties you can now set it to spawn an object instead of using its default particle image (very cool!). However, once you've set it to an object in the editor there isn't an explicit way to clear the field and reset to the particle image.

    A particle action exists to unset the object back to the particle object so you can ensure it is reset at runtime, but ideally you would be able to clear the property field in the editor.

    You can set the object to the same particle object, but it is not obvious if this means you are then spawning child particle objects or reverting to using the particle image, the former having processing overheads. Does anyone know which case is correct? If the former, is there a way to reset the field that I'm missing?

  • Ashley How about giving a periodic heads-up on the release notes or in a blog post that you're going to be reviewing suggestions soon "so update your votes", with links to the site and guidelines. That way you're more likely to capture new voters and encourage existing voters to update their selections, and you're less likely to focus on building features that have fallen out of vogue.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It depends upon the dimensions of your tilemaps - if one of the maps is larger than the other then the smaller one may be picked as being closer, even if the player overlaps more of the larger, because the origin of the smaller tilemap is nearer to the player's origin. There is also another issue: the tilemap object's origin is in the top left corner and can't be changed, so in order to find the centre you would need to add 0.5*tilemap.width to tilemap.X and 0.5*tilemap.height to tilemap.Y.

    Could you explain what the new problems are? It will be easier to suggest solutions if you can outline all of the constraints.

  • You can use the "pick overlapping point" system condition to select the tilemap that the player sprite's x,y is overlapping, and then use the tilemap's PositionToTileX PositionToTileY expressions to pick the tile:

    dropbox.com/scl/fi/bdt22wmtv0d8kn7tjhkod/pickTilemap.capx

    Note that the player's origin would need to be centred in order to pick the tilemap that the player was most over. If you can't have the player origin in the centre then you can add an extra image point in the centre and use those co-ordinates to pick the tile map (using player.ImagepointX(1), player.ImagepointY(1))

  • Containers are your friend. If you check on the properties bar for the enemy you'll see a container option - click create and add the components of the health bar to the enemy's container. Now when you spawn an enemy it will also be spawned with its own health bar.

    You will need to pin the bar to the enemy on creation.

    Whenever you pick the enemy using conditions its health bar will also be picked and any actions will only apply to that enemy's bar.

    You can learn more about containers here: construct.net/en

  • On leaving layout 1 you could save the name of the layer that the player sprite is on to a global variable and then on start of layout 2 move the player sprite to that layer using the global variable in the "Move to Layer" action. Likewise on transitioning back from 2 to 1.