Asmodean's Recent Forum Activity

  • I don't think that the behaviors are designed for what your are trying to do. If you use the 8-direction behavior and rexrainbow's 'push out solid' behavior you get the same odd result by pushing things. I would suggest you use the physic-behavior or try it without behaviors, but that could get messy if you want more than only push one of your boxes. I made a little example, but I give up to stop movement of the blue and the red boxes if they collide. So you can only push the yellow and the other still overlap.

    https://drive.google.com/file/d/0B5FlDY ... sp=sharing

  • phantomunboxing

    Your problem is this line:

    CloneTrooperHealth=0 -> System Go to go to level

    and the other lines where you compare if the enemy has health zero.

    The Variable you set to 0 at the end of the fight is still zero if you switch back to your level-menu and the event sheet is one big loop. So every time it compares the health variable and it is set to zero it switches immediately back to you level menu. So the click in the menu works but it switches so fast back to the menu you doesn't see anything of the other layout. You have either set the health to another value then zero after beaten the enemy or have a variable set when a level is beaten and compare against this variable.

  • phantomunboxing

    A really wild guess, have you linked the layout with the two not working button to your event sheet?

  • You could do that with a variable what increase or decrease.

    And I would use ViewportRight not LayoutWidth.

    Global number acceleration =0
    
    Touch| is in touch  System| add 0.1 from acceleration 
        system| touch.x < ViewportRight(0)/2  Sprite|Set X to Self.x-acceleration
        system| touch.x > ViewportRight(0)/2  Sprite|Set X to Self.x+acceleration
                                          
    Touch| on any touch end   System|set acceleration to 0
    [/code:2u4h1u94]
  • That is because of the position of the origin Image-Point. If your grid is for example 32x32 and your sprite 64,64 and the origin is in the middle it will snap in the middle of the sprite. If you make your sprite now 70*70 it will still snap still in the middle, but it will overlap 6 pixel over the grid. If you want that your sprite to snap with a specific corner you have to place the origin Image-Point to that position

  • I made something but I don't know if you can implement it in your game or even if its that what you want.

    https://drive.google.com/file/d/0B5FlDY ... sp=sharing

    You have to exchange the rotating square with a dot or something so that the rotation isn't visible anymore.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Pick Sprite where Sprite.Opacity = 100 is a condition and if the condition is not true it wont trigger and never execute the action or go to the sub-condition.

    If you want to know if there are sprites with opacity=0 then you have to do this with an else-condition.

  • .

    The problem seems to arise because the clicked state does not override the hover state (if you can click the image, your cursor is definitely over the object). So hover state is always active in these 2 states. If I do not use the hover state, then I can get the idle and click states working together.

    It's the other way around. All events are in one big game-loop and if you click your image the state will be immidetly in the next tick overridden by you hover-event. The click-event triggers but you don' see it.

    Put a 'trigger once' to your 'cursor is over'-event. But be careful you have to put it under your 'cursor is over'-event (not a subevent) otherwise you only trigger once the animation setting to 1 not the hover-event.

  • I think I understood your problem now. You want that if you overlap with the first result box, that the next result box reveal the result too. In the moment it works only if you spawn the boxes in real time during the game, but if you put the (result)boxes all in the layout in places, all boxes at once will show (spawn) the result. It's that correct?

    I've made a capx and I hope that is what you want. It uses the pick nearest condition, so you have to be caution not to set the blocks of result boxes to tight or it could be that the wrong box is picked.

    https://drive.google.com/file/d/0B5FlDY ... sp=sharing

  • Because your ball never hit exactly x=280.

    If you have a speed of 240 in your bullet-behavior, the ball will travel 4 pixel each tick, if you set the ball in the beginning to x=1 every tick it will travel 4 pixel, so after the first tick it is x=5 then x= 9 and at least x=277 and x=281

    so it will never trigger x=280.

    Even if you set it to x=0 a little slowdown could alter delta time and you will miss x=280 again.

    Better is to use x>280.

  • First at all your game looks great and a very nice idea.

    I think I can't really help, your game is quite to big and I have not enough time to understand it completely.

    But I saw in your "SetearCajaResultado"-Function something that bothers me. I don't know if this could be your problem, but the first event in this function, you have an 'and'-block with 'pick all' and 'pick Caja where Caja.AsignarNumero=0'. If your player has a collision all blocks would be picked and all blocks would spawn a number. Anyway, the first condition with pick all should be necessary at all. But this is a wild guess I don't looked your game completely through.

  • [quote:1w5iiw1w]

    Why doesn't something like my example work - what am I missing?

    Because your two events fight against each other.

    If there is a collision the first event will still trigger, so the first event rotate the sprite to sprite1 and move 1 pixel and second event rotate the sprite to sprite2 and move 1 pixel at the end nothing will happen.

    Here an example that should work:

    System On start of Layout -> Sprite Set angle toward(sprite1.x,sprite1.y) 
    System Every tick -> Move forward sprite.speed*dt pixels
    Sprite On collision with sprite1 ->Sprite Set angle toward(sprite2.x,sprite2.y)  
    [/code:1w5iiw1w]
Asmodean's avatar

Asmodean

Member since 31 Jul, 2015

Twitter
Asmodean has 9 followers

Trophy Case

  • 9-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Popular Game One of your games has over 1,000 players
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

15/44
How to earn trophies