Mouse Button Down Enter/Leave Problem

Non-platform specific questions.

Mouse Button Down Enter/Leave Problem

Postby fauldran » Thu Jan 05, 2006 4:17 am

I am working on an isometric maze game. When the player clicks the ground actor (tile actor) the player character move to the location. This script all works great.

The problem is that GE does not seem to accurately detect if the mouse click occurs on the ground actor.

During debug I created a Mouse Enter event that sets the ground transparency to 50% and a Mouse Leave event that sets the ground transparency to 100%. This way when GE detects that the mouse is over the ground it makes it transparent and when the mouse leaves the ground returns to solid.

When this test is executed GE only turns the ground transparent when the mouse is over specific parts of a tile graphic. I have tried 32 bit graphics and 24 bit graphics to see if it was specific to the transparency. Same result. The tiles are squares rotated 45degrees to form diamonds. Thus they have transparent areas in each corner. All the pixels in the diamond area are fully opaque.

Using a filled region actor that covers the screen does work fine with mouse inputs. But I only want the player to move when the ground is clicked. Also I want to be able to do other things when other actors are clicked but the same problem exists for them too.

Anybody have any thoughts?
Thanks.
fauldran
 
Posts: 43
Joined: Tue Dec 20, 2005 10:52 am
Score: 0 Give a positive score

Update>

Postby fauldran » Thu Jan 05, 2006 4:52 am

Not sure but it seems to have somthing to do with proximity to the center of the screen. It seems to get more accurate the closer to the center of the screen.
fauldran
 
Posts: 43
Joined: Tue Dec 20, 2005 10:52 am
Score: 0 Give a positive score

Postby makslane » Thu Jan 05, 2006 12:30 pm

I think is a bug with mouse enter/leave with tiles.
Can you send me a little game with this problem?
Game Editor is an open source game creator software that's wants to pay it's developers to keep evolving.
If you like Game Editor, make a review!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby Game A Gogo » Thu Jan 05, 2006 2:13 pm

maybe you should see the Abuse 2 demo, its has quinda trhe same ting when you click on the background, inted it shoot, not moves...

hope it help.
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby fauldran » Thu Jan 05, 2006 6:14 pm

I figured it out. Its all my fault. :D

I was using an actor that was not drawn but set to receive events to manage moving the view and interface elements around. Well, when the mouse is over this invisible actor (which was left with the pacman graphic) GE correctly detects that the mouse is over the invisible actor and not the ground. Thus causing the perceived "problem" to be relative to the player position.

Sorry to bother everyone with this.

Markslane: Please disregard the email I sent you.

I love game editor. I am continually surprised and impressed with the features and the way they are implemented.
fauldran
 
Posts: 43
Joined: Tue Dec 20, 2005 10:52 am
Score: 0 Give a positive score

Postby makslane » Thu Jan 05, 2006 7:59 pm

Ok, thanks
Game Editor is an open source game creator software that's wants to pay it's developers to keep evolving.
If you like Game Editor, make a review!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron