Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, ozgur), 1,421 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 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 | chip programmers | 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