mekonbekon's Recent Forum Activity

  • Add another instance variable to your asteroid object e.g. lootHP and set it to 1000

    In the event that you deduct hp from the asteroid add an action to deduct the same from lootHP

    Beneath that event add the sub-event : If asteroid.lootHP <=0 | asteroid spawn loot; asteroid set lootHP to 1000.

  • You can have this one for free <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">

    https://www.dropbox.com/s/vl30jbms1ucpf ... .capx?dl=0

    Just change Event 6: "avatar|On collision with object" for "On E is pressed" and "avatar is overlapping with object"

  • Hi all,

    I've been playing around with the platform behaviour and noticed that the "next to wall" condition doesn't trigger if there is tilemap collision directly above the avatar:

    https://www.dropbox.com/s/90krbak275kg0 ... 0.c3p?dl=0

    If you push into the wall either side of the central block then the correct animation is shown, but if you push into wall on the far left or right of the level (where the avatar is below a tile) then for some reason the animation doesn't run. Any ideas what the problem is? I can get around it by making my avatar smaller so that there is a gap between it and the ceiling, but that isn't ideal.

    Bonus related issue: If the avatar is exactly the same size as a tile then it won't fit through a single tile width/height gap. Why is this and is there any way to get around it? In the linked demo I've reduced the avatar's collision by a pixel on the top and sides, but it's a bit messy (you can see the overlap between the avatar and the tilemap) and would prefer a more aesthetically agreeable solution.

    Thanks in advance for any help <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

  • Can confirm, here's a cp3:

    https://www.dropbox.com/s/dia9gfn1hm68l ... n.c3p?dl=0

    Also if you check in debug there is a minute rounding error on the angle: it adds an extra -3x10^-14 to the angle - not sure why this would be.

    Weirdl,y even though it appears that the position of the left wall is affecting the trajectory of the ball, it seems that the ball isn't colliding with it, if my collision check is working correctly (run in debug and check the no. variable for the left and top wall).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It looks to me like the left hand ball is colliding with the left wall before it reaches the top of the screen - have you checked in the debug to see what its angle and x value are as it moves up the screen? It might be that it's slightly off -90 degrees and so is incrementally edging to the left as it progresses.

  • hutcho1991

    Check that in the layer properties for the results layer the parallax setting is 0,0 and that your results objects are centred in the layout window (the dotted line in the layout editor).

    Also, rather than popping objects out from behind the background you can switch the results layer visible and invisible using the System|Layers & Layout | Set Layer Visible action.

    I've used the top-down shooter template from the C2 examples to show what I mean:

    https://www.dropbox.com/s/ofw4aaf6zf386 ... .capx?dl=0

    If you tap the space bar it will hide the on-screen message. Notice that it remains in position regardless of where you move in the layout.

    In the editor, if you click on the UI layer and view its settings, observe that the parallax is set to 0,0.

    On event sheet 1, events 9,10 and 11 are being used to toggle the visibility.

    Good luck with making your game!

  • I've updated the demo:

    https://www.dropbox.com/s/7in3nja83t3oy ... .capx?dl=0

    If you click first on the scrolling layer and drag you can drag over the HUD without triggering it.

    If you click first on the HUD it will register the input, and you can drag without moving the scrolling layer.

  • You're welcome

    Do you want avoid triggering an object that is on the top layer if you swipe across it whilst scrolling ? If so, this may work (although there could well be a more straightforward solution):

    Add all the objects on the non-scrolling layer to a family .

    Add a global variable "isScroll" set to 0.

    On touch start:

    if is NOT touching family: set isScroll to 1.

    On touch family:

    if isScroll = 0

    if object A do X

    if object B do Y etc

    On touch end: set isScroll to 0

  • No, that's fine, it must be something else that's causing the issue.

  • willmonteirofx Glad to be able to help out - let me know if you need any further explanation. The prototype is looking nice btw

  • I'm not sure why that would be, as long as the layer you want to scroll is still set to parallax (100,100). Just to confirm, you're setting the parallax in the layer properties rather than using an action? If so pm me the capx and I'll take a look.

  • No worries

    Place the objects that you don't want to scroll on a separate layer. In the settings for that layer set the parallax to 0,0.

    For example, in the demo capx I placed the "Layer 1" text on layer 1 and set the layer 1 parallax to 0,0).

mekonbekon's avatar

mekonbekon

Early Adopter

Member since 9 May, 2014

Twitter
mekonbekon has 13 followers

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • x3
    Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

20/44
How to earn trophies