Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AndrewAMD, 7th_zorro, ozgur, Quad), 841 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
direct entity with mouse pointer? #417172
02/09/13 16:27
02/09/13 16:27
Joined: Nov 2011
Posts: 29
G
GreenDeveloper Offline OP
Newbie
GreenDeveloper  Offline OP
Newbie
G

Joined: Nov 2011
Posts: 29
how can i direct entity with mouse pointer
similar;
mouse_map = "mymodel.mdl";


"Actually we are all Guybrush.." GreenDeveloper
Re: direct entity with mouse pointer? [Re: GreenDeveloper] #417173
02/09/13 16:38
02/09/13 16:38
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline
Expert
MasterQ32  Offline
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
just take a look at mouse_ent


Visit my site: www.masterq32.de
Re: direct entity with mouse pointer? [Re: MasterQ32] #417176
02/09/13 17:04
02/09/13 17:04
Joined: Nov 2011
Posts: 29
G
GreenDeveloper Offline OP
Newbie
GreenDeveloper  Offline OP
Newbie
G

Joined: Nov 2011
Posts: 29
Originally Posted By: MasterQ32
just take a look at mouse_ent


i want do this;


how can i do with mouse_ent?

i 'll try vec_set but it doesnt work.


"Actually we are all Guybrush.." GreenDeveloper
Re: direct entity with mouse pointer? [Re: GreenDeveloper] #417178
02/09/13 17:08
02/09/13 17:08
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
You need to create the model for this and the calculate the world coordinates for the mouse position.

When using a normal entity you can use vec_for_screen:
http://www.conitec.net/beta/avec_for_screen.htm

When using a view entity you can use rel_for_screen:
http://www.conitec.net/beta/avec_rel_for_screen.htm


Always learn from history, to be sure you make the same mistakes again...
Re: direct entity with mouse pointer? [Re: Uhrwerk] #417180
02/09/13 19:04
02/09/13 19:04
Joined: Nov 2011
Posts: 29
G
GreenDeveloper Offline OP
Newbie
GreenDeveloper  Offline OP
Newbie
G

Joined: Nov 2011
Posts: 29
Originally Posted By: Uhrwerk
You need to create the model for this and the calculate the world coordinates for the mouse position.

When using a normal entity you can use vec_for_screen:
http://www.conitec.net/beta/avec_for_screen.htm

When using a view entity you can use rel_for_screen:
http://www.conitec.net/beta/avec_rel_for_screen.htm


thx Uhrwerk, i greateful you. its work laugh


"Actually we are all Guybrush.." GreenDeveloper
Re: direct entity with mouse pointer? [Re: GreenDeveloper] #417182
02/09/13 19:28
02/09/13 19:28
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Did you fix the problem with the looped entity creation?


Always learn from history, to be sure you make the same mistakes again...
Re: direct entity with mouse pointer? [Re: Uhrwerk] #417183
02/09/13 19:46
02/09/13 19:46
Joined: Nov 2011
Posts: 29
G
GreenDeveloper Offline OP
Newbie
GreenDeveloper  Offline OP
Newbie
G

Joined: Nov 2011
Posts: 29
Originally Posted By: Uhrwerk
Did you fix the problem with the looped entity creation?


yes its too basic but i didnt know this function. here code:
Code:
action kutu_act()
{
	player = my;
	VECTOR vectord;
	while(1)
	{
		mouse_mode = 4;  
    	vectord.x = mouse_pos.x;
    	vectord.y = mouse_pos.y;
    	vectord.z = 200;
    	vec_for_screen(vectord,camera);
    	vec_set(player.x, vectord);
    	wait(1);
	}
}



"Actually we are all Guybrush.." GreenDeveloper
Re: direct entity with mouse pointer? [Re: GreenDeveloper] #417186
02/09/13 20:23
02/09/13 20:23
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
What about:
Code:
action kutu_act()
{
	player = my;
	mouse_mode = 4;  
	while(1)
	{
		my.x = mouse_pos.x;
		my.y = mouse_pos.y;
		my.z = 200;
		vec_for_screen(&(my->x),camera);
		wait(1);
	}
}



Always learn from history, to be sure you make the same mistakes again...
Re: direct entity with mouse pointer? #417188
02/09/13 20:54
02/09/13 20:54
Joined: Nov 2011
Posts: 29
G
GreenDeveloper Offline OP
Newbie
GreenDeveloper  Offline OP
Newbie
G

Joined: Nov 2011
Posts: 29
Originally Posted By: Uhrwerk
What about:
Code:
action kutu_act()
{
	player = my;
	mouse_mode = 4;  
	while(1)
	{
		my.x = mouse_pos.x;
		my.y = mouse_pos.y;
		my.z = 200;
		vec_for_screen(&(my->x),camera);
		wait(1);
	}
}



hehe you 're amazing laugh
i am not good at with pointers laugh


"Actually we are all Guybrush.." GreenDeveloper

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