kebabmaster's Forum Posts

  • 2 posts
  • Interesting, it seems different from my experience, but maybe you mean something different, I can resize the preview window and it still has the correct behavior. Is that what you mean by 'user resizing the windows'? I wonder what is different.

    Here's my example: gofile.io/d/qulRnW

    The code is simple:

    > let spriteInst = null
    let spriteList= runtime.objects.Sprite.getAllInstances()
    let mouseInst = runtime.objects.Mouse
    for (let i=0;i<spriteList.length;i++)
    {
    	spriteInst = spriteList[i]
    	if (spriteInst.containsPoint(mouseInst.getMouseX(),mouseInst.getMouseY()))
    	{
    		spriteInst.opacity = 0.5
    	} else
    	{
    		spriteInst.opacity = 1.0
    	}
    }

    That's definitely a working option, ain't thought of that. I was trying to determine the mouse position from the click event which seems to be your regular JS click.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Personally, I found it the easiest to abstract the input events into an event sheet and then actually process them via the scripts (i.e. functions).

    Sadly, I did not find Mikal implementation suitable for my needs - the containsPoint does not take into account the user resizing their window.

  • 2 posts