Asmodean's Forum Posts

  • Try:

    Global number rot = 0

    Keyboard| On Space pressed -> System| add 180 to rot

    Block| Invert(is clockwise from rot) -> Block| Rotate 1 degrees clockwise

    System| rot >= 360 -> System set rot to 0

    Invert means that you Invert 'is clockwise from'

  • You have also to increase the 'Max fall speed' . The gravity in the Platform-Behavior is only the acceleration. If your leaf has reached the 'Max fall speed' increasing the gravity will do nothing.

    One hint, if you set the gravity negative your leaf will float up. Maybe you can use that for a gust or something like that.

  • le Canapin

    Have you tried it without the pin behavior?

    I see no reason to use that if you set the position every tick.

  • [quote:2fplv57l]Thanks but is the rotation behavior not to overpowered?

    I don't think that it will have an effect of memory or performance. First, that are only a few bytes, second, I hope that developer of Construct knows best to make something like that most efficient.

  • Google Chrome on Desktop has a 'Device Mode' to test different mobile resolutions. Hit F12 and in the window that comes up click on the second Icon from the left on the top of that window. Now you can choose different device resolutions.

    https://developer.chrome.com/devtools/docs/device-mode

    Hope that will help.

  • I would use the rotate- and the timer-behavior for your circle.

    System| Every 15 seconds -> Sprite| Set Rotate speed to 'fast' degrees per second
                             -> Sprite| Start Timer "SlowDown" for 5.0(Once)
    
    Sprite| On Timer "SlowDown" -> Sprite| Set Rotate speed to 'normal' degrees per second
    [/code:26gcq14q]       
    normal and fast are your values.
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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