Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
4 registered members (NewbieZorro, Grant, TipmyPip, AndrewAMD), 13,346 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
checking if mouse is on a block or an entity? #338036
08/15/10 11:13
08/15/10 11:13
Joined: Nov 2008
Posts: 196
the wrong place
Muhsin Offline OP
Member
Muhsin  Offline OP
Member

Joined: Nov 2008
Posts: 196
the wrong place
hi!

is it possible to check if the mouse is over a block or an entity and make it behave differently when its clicked?

how can I do this, if its possible?

thanks!

- Muhsin Kaymak


Come and play my new browsergame - Valley Of Wolves:

http://www.mafiacreator.com/ValleyOfWolves

Hurry and be the first to take over the different business' in the Valley Of Wolves, before anybody else does it!
And be the most feared MafiaBoss in the World!!
Re: checking if mouse is on a block or an entity? [Re: Muhsin] #338037
08/15/10 11:21
08/15/10 11:21
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline
Expert
Espér  Offline
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
You set this in the Entity Action:
Code:
my.emask |= ENABLE_CLICK | ENABLE_TOUCH | ENABLE_RELEASE;
my.event = something;



and in the event function you ask:
Code:
function something()
{
	if(event_type == EVENT_TOUCH)
	{
		//When Mouse gets on
	}
	else if(event_type == EVENT_RELEASE)
	{
		//When Mouse gets off
	}
	else if(event_type == EVENT_CLICK)
	{
		//When clicked
	}
}




Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: checking if mouse is on a block or an entity? [Re: Espér] #338042
08/15/10 12:29
08/15/10 12:29
Joined: Nov 2008
Posts: 196
the wrong place
Muhsin Offline OP
Member
Muhsin  Offline OP
Member

Joined: Nov 2008
Posts: 196
the wrong place
ok, thanks for the help!


Come and play my new browsergame - Valley Of Wolves:

http://www.mafiacreator.com/ValleyOfWolves

Hurry and be the first to take over the different business' in the Valley Of Wolves, before anybody else does it!
And be the most feared MafiaBoss in the World!!

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1