kebabmaster's Recent Forum Activity

  • 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.

kebabmaster's avatar

kebabmaster

Member since 21 Aug, 2018

None one is following kebabmaster yet!

Trophy Case

  • 6-Year Club
  • Email Verified

Progress

7/44
How to earn trophies