Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (AndrewAMD, Nymphodora, Quad, TipmyPip, Imhotep), 852 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
mouse_ent does not work in my application #462292
09/19/16 16:25
09/19/16 16:25
Joined: Sep 2009
Posts: 991
Budapest
Aku_Aku Offline OP
User
Aku_Aku  Offline OP
User

Joined: Sep 2009
Posts: 991
Budapest
I started the engine in my application. I created a panel, a text, and a button on the panel. They are works.
The text can be see on the panel with its content. The button can be see on the panel and reacts on mouse click.
My program is able to follow the position of the mouse, and the x-y values are also displayed on the panel.
But, when i want to use the mouse_ent function to detect which entity is under the pointer i got always 0x0 back.
What do i do wrong?
I set the mouse_mode to 2 and to 4, results were same.
Thanks in advance.

Re: mouse_ent does not work in my application [Re: Aku_Aku] #462295
09/19/16 18:01
09/19/16 18:01
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
txesmi Offline
Serious User
txesmi  Offline
Serious User

Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
Hi,
try encreasing 'mouse_range'.

Salud!

Re: mouse_ent does not work in my application [Re: txesmi] #462297
09/19/16 18:52
09/19/16 18:52
Joined: Sep 2009
Posts: 991
Budapest
Aku_Aku Offline OP
User
Aku_Aku  Offline OP
User

Joined: Sep 2009
Posts: 991
Budapest
Thanks for the advise.
I tried with 9000, nothing was changed.

Re: mouse_ent does not work in my application [Re: Aku_Aku] #462302
09/20/16 09:19
09/20/16 09:19
Joined: Jul 2010
Posts: 283
Germany
J
jenGs Offline
Member
jenGs  Offline
Member
J

Joined: Jul 2010
Posts: 283
Germany
yea, had this problem, too. I think it is an error/bug. I asked a long time ago for a fix. Never came.

Re: mouse_ent does not work in my application [Re: jenGs] #462303
09/20/16 10:31
09/20/16 10:31
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Quad Online
Senior Expert
Quad  Online
Senior Expert

Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
just scan it yourself. check mouse_dir3d or something like that on manual.

also mouse_mode is involved in some way for mouse_ent.

Last edited by Quad; 09/20/16 10:34.

3333333333
Re: mouse_ent does not work in my application [Re: Quad] #462306
09/20/16 11:24
09/20/16 11:24
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
It used to work for me... I'll check it out.

Edit: well, this code works for me.. Maybe I didn't understand your problem?
Code:
action cube(){
		
	while(1){
		
		if(is(my, TRANSLUCENT)){
			reset(my, TRANSLUCENT);
		}
		
		wait(1);
	}
}

void main(){
	fps_max = 60;
	level_load("");
	
	mouse_mode = 4;
	
	ent_create(CUBE_MDL, vector(200, 0, 0), cube);
	ent_create(CUBE_MDL, vector(200, -25, 0), cube);
	ent_create(CUBE_MDL, vector(200, 25, 0), cube);
	
	while(1){
		
		if(mouse_ent){
			set(mouse_ent, TRANSLUCENT);
		}
		
		wait(1);
	}
}



Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: mouse_ent does not work in my application [Re: 3run] #462313
09/20/16 15:28
09/20/16 15:28
Joined: Sep 2009
Posts: 991
Budapest
Aku_Aku Offline OP
User
Aku_Aku  Offline OP
User

Joined: Sep 2009
Posts: 991
Budapest
Thanks for the replies to jenGs, Quad and 3run.
@jenGs: i remember i had such code that worked, in lite-c. The situation is changed now.
@Quad: I don't know how could be involved mouse_dir3d when there are only one panel and one text. I mentioned in the opening post i tried mouse_mode=2 and mouse_mode=4 too.
@3run: It is a pity, but your code seems to as a simple lite-c one, processed by the compiler provided by the Gamestudio.

This program is a mix of c++ and lite-c. Compiled with Qt. I would use your advises, but they are not fit into this environment.
I thought it is clear for everyone, if this post is here in External Languages chapter, i use the SDK with third party compiler.

I think i misunderstood what is the object of this function.
It is ENTITY, but not panel or text.
Thanks guys, i am sorry.

Last remark, i recognized, what i was looking for really, is the mouse_panel

Last edited by Aku_Aku; 09/20/16 18:08.

Moderated by  TWO 

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