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
3 registered members (TipmyPip, AndrewAMD, NewbieZorro), 16,055 guests, and 7 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
Events #339131
08/24/10 19:19
08/24/10 19:19
Joined: Nov 2009
Posts: 89
Germany, NRW
T
TrackingKeks Offline OP
Junior Member
TrackingKeks  Offline OP
Junior Member
T

Joined: Nov 2009
Posts: 89
Germany, NRW
Hello,
I have tried to use EVENT_CLICK, EVENT_RELEASE and EVENT_TOUCH with a simple cube for testing. All of them are working but they aren't working correctly. The mouse does not detect the entities every time..
But why? Any ideas?
Thanks for your help

Here is some code
Code:
PANEL* baumodus_idee_loeschen1_pan =
{
	button=95,260,"ok1s.tga","ok2s.tga","ok1s.tga",baumodus_idee_loeschen_objekt(),NULL,NULL;
	button=320,260,"abbrechen1.tga","abbrechen2.tga","abbrechen1.tga",baumodus_idee_loeschen_hide(),NULL,NULL;
	layer = 13;
   flags |=OVERLAY,TRANSLUCENT;
   bmap = "baumodus_loeschen.tga";
}
...

function baumodus_idee_loeschen()
{
	if(event_type == EVENT_CLICK)
	{
		test_ent=mouse_ent;
		baumodus_idee_loeschen1_pan.pos_x = (screen_size.x - bmap_width(baumodus_idee_loeschen1_pan.bmap))/2; 
   	baumodus_idee_loeschen1_pan.pos_y = (screen_size.y - bmap_height(baumodus_idee_loeschen1_pan.bmap))/2; 
		baumodus_idee_loeschen1_pan.flags|=SHOW;
	}
	if(event_type == EVENT_TOUCH)
	{
		mouse_map=cursor_delete_tga;
	}
	else if(event_type == EVENT_RELEASE)
	{
		mouse_map=cursor_pcx;
	}
}
...
my.emask = ENABLE_CLICK|ENABLE_TOUCH|ENABLE_RELEASE;
my.event = baumodus_idee_loeschen;
...




Gamestudio: A7.82 Commercial/A8 Commercial
System specs (Laptop):
Windows 7 64bit
DirectX v10.1
Intel Core i7-720QM CPU @ 1,60 GHz
4GB DDR2 Ram
NVIDIA GeForce GT 230M (1024MB)
Re: Events [Re: TrackingKeks] #339683
08/28/10 16:59
08/28/10 16:59
Joined: Nov 2009
Posts: 89
Germany, NRW
T
TrackingKeks Offline OP
Junior Member
TrackingKeks  Offline OP
Junior Member
T

Joined: Nov 2009
Posts: 89
Germany, NRW
Nobody can help me?

I'll try to explane the problem again:
When I'm moving my mouse over an entity, the cursor should be changed but the mouse is changed and the event is called only sometimes.
I've tested it with different entities and there were the same results:
I had to search after a clickable position.

Hope somebody knows how to solve this problem^^


Gamestudio: A7.82 Commercial/A8 Commercial
System specs (Laptop):
Windows 7 64bit
DirectX v10.1
Intel Core i7-720QM CPU @ 1,60 GHz
4GB DDR2 Ram
NVIDIA GeForce GT 230M (1024MB)
Re: Events [Re: TrackingKeks] #339773
08/29/10 08:52
08/29/10 08:52
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
Have a look at mouse_range though the way you're trying I've not ever tried.

I always write anything like this with mouse_ent, if you need an example of that let me know.

Re: Events [Re: MrGuest] #339802
08/29/10 11:45
08/29/10 11:45
Joined: Nov 2009
Posts: 89
Germany, NRW
T
TrackingKeks Offline OP
Junior Member
TrackingKeks  Offline OP
Junior Member
T

Joined: Nov 2009
Posts: 89
Germany, NRW
Thanks for your help!
mouse_range changing has not solved the problem because it was my mistake:
I had forgotten a function which generates fog about all entities near the camera. This explains the strange script behaviour too because the fog layed about all other entities.


Gamestudio: A7.82 Commercial/A8 Commercial
System specs (Laptop):
Windows 7 64bit
DirectX v10.1
Intel Core i7-720QM CPU @ 1,60 GHz
4GB DDR2 Ram
NVIDIA GeForce GT 230M (1024MB)

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