Arkanoid Mouse Limitation

This forum is currently in read-only mode.
From the Asset Store
Paint to prevent ball from falling and destroy all blocks!
  • I'm creating an arkanoid game. I need two functions:

    • to stop a mouse moving
    • to limitate it between two coordinates

    I mean, not a sprite with mouse position, I need it for Mouse.

    Something like:

    M&K set mouse X to: clamp(mousex, 30, 650),

    but this isnt work((

    May its possible with Python?

  • I found a plugin Input Sytem. It may to be a solution. I need this action:

    On mouse axe X + : sprite set x position to .x+1

    On mouse axe Y - : sprite set x position to .x-1

    Anyone can creat a .cap for me?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I do it!

    So I used objects Window and SysInfo.

    For limitation i Used:

    If m&k.absmousex < sysinfo.getscreenwidth-370 then m&k set mouse x to sysinfo.getscreenwidth-370;

    If m&k.absmousex > sysinfo.getscreenwidth+250 then m&k set mouse x to sysinfo.getscreenwidth+250;

    {250 and 370 its a number setted by me}

    For stopping a mouse i used:

    if global('stopped') = 1 then:

    trigger one : global('mx') to m&k.absmousex

    always : m&k set x to global('mx')

  • Thanks for sharing your solution! <img src="smileys/smiley4.gif" border="0" align="middle" />

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)