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
4 registered members (tomaslolo, bigsmack, AndrewAMD, TipmyPip), 903 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 5 1 2 3 4 5
Re: How make player go to the point you clicked with mouse? [Re: ] #269233
06/02/09 11:01
06/02/09 11:01
Joined: Mar 2006
Posts: 321
Norway
Eagelina Offline OP
Senior Member
Eagelina  Offline OP
Senior Member

Joined: Mar 2006
Posts: 321
Norway

@mercuryus

the Walk to mouse is 3D. I get the player to move 1 time to the mouse, but when I click one more time to move it somewhere else, the player just turns and stay still......

I know it is something very easy to solve this, but I cant see it....... it is so frustrating.... blush

Last edited by Eagelina; 06/02/09 11:01.

A6 and A7 Commercial
-------------------
Programmer always searching for more to learn and understand. smile
Re: How make player go to the point you clicked with mouse? [Re: KiwiBoy] #269239
06/02/09 11:07
06/02/09 11:07
Joined: Mar 2006
Posts: 321
Norway
Eagelina Offline OP
Senior Member
Eagelina  Offline OP
Senior Member

Joined: Mar 2006
Posts: 321
Norway
tried to swap ignor passable with glide, but no change.... goes one time to the point I clicked and when I click somehwere else..... player just turns and stay still.... as I was writing to mercuryus , the answer is staring right in my face..... I know it, but I cant see it..... it is always an easy solution..... wink


A6 and A7 Commercial
-------------------
Programmer always searching for more to learn and understand. smile
Re: How make player go to the point you clicked with mouse? [Re: Eagelina] #269241
06/02/09 11:12
06/02/09 11:12
Joined: Apr 2009
Posts: 298
Southern Oceans
KiwiBoy Offline
Member
KiwiBoy  Offline
Member

Joined: Apr 2009
Posts: 298
Southern Oceans
AUM 80 Q and A for the article mentioned.


Use the 'manual' Luke, the manual is your friend. 'Self reminder' smile

My WebPage
Re: How make player go to the point you clicked with mouse? [Re: KiwiBoy] #269242
06/02/09 11:12
06/02/09 11:12
Joined: Mar 2006
Posts: 321
Norway
Eagelina Offline OP
Senior Member
Eagelina  Offline OP
Senior Member

Joined: Mar 2006
Posts: 321
Norway
@KiwiBoy :

Found the code that George wrote. It is in Aum 34. I am going to study it....


A6 and A7 Commercial
-------------------
Programmer always searching for more to learn and understand. smile
Re: How make player go to the point you clicked with mouse? [Re: KiwiBoy] #269243
06/02/09 11:13
06/02/09 11:13
Joined: Mar 2006
Posts: 321
Norway
Eagelina Offline OP
Senior Member
Eagelina  Offline OP
Senior Member

Joined: Mar 2006
Posts: 321
Norway
ok going to look at that too


A6 and A7 Commercial
-------------------
Programmer always searching for more to learn and understand. smile
Re: How make player go to the point you clicked with mouse? [Re: Eagelina] #269319
06/02/09 17:17
06/02/09 17:17
Joined: Mar 2006
Posts: 321
Norway
Eagelina Offline OP
Senior Member
Eagelina  Offline OP
Senior Member

Joined: Mar 2006
Posts: 321
Norway
How do I "translate" this to Lite-C ?

trace_mode = ignore_you + ignore_passable + use_box;


A6 and A7 Commercial
-------------------
Programmer always searching for more to learn and understand. smile
Re: How make player go to the point you clicked with mouse? [Re: Eagelina] #269322
06/02/09 17:32
06/02/09 17:32
Joined: Dec 2002
Posts: 616
Austria
Stromausfall Offline
User
Stromausfall  Offline
User

Joined: Dec 2002
Posts: 616
Austria
in lite-c u add the "trace_mode" to the trace command itself (look for c_trace in the "online manual")

c_trace(startPos,endPos,IGNORE_YOU|IGNORE_PASSABLE|USE_BOX);

cheers


get the C# wrapper:
for A7.85.4 and A8.30.4, Version 2.3.9
at http://acknexwrapper2.matthias-auer.net/ or visit the thread
Re: How make player go to the point you clicked with mouse? [Re: Stromausfall] #269326
06/02/09 17:34
06/02/09 17:34
Joined: Mar 2006
Posts: 321
Norway
Eagelina Offline OP
Senior Member
Eagelina  Offline OP
Senior Member

Joined: Mar 2006
Posts: 321
Norway
Thanks! I am learning fast here..... grin


A6 and A7 Commercial
-------------------
Programmer always searching for more to learn and understand. smile
Re: How make player go to the point you clicked with mouse? [Re: Eagelina] #269345
06/02/09 19:02
06/02/09 19:02
Joined: Oct 2004
Posts: 1,655
T
testDummy Offline
Serious User
testDummy  Offline
Serious User
T

Joined: Oct 2004
Posts: 1,655
Simply forgot to reset variabel_1?
Not responsible for flaws / errors in code.
Code is "sample" only.
Code:
VECTOR* pl_vDest = { x=0; y=0; z=0; } // player dest VECTOR
var pl_bDest = 0;  // player dest VECTOR set (boolean)?
action player_mouseAct(){
	c_setminmax(me);
	VECTOR temp; vec_zero(temp);
	while(1){
		if(mouse_left==1){
			pl_bDest = 1;		// dest set
			vec_set(pl_vDest, mouse_pos3d.x);
		}
		if (pl_bDest) {
			vec_diff(temp, pl_vDest, my.x);
			vec_to_angle(temp, temp);
			temp.pan = ang(temp.pan - my.pan);
			temp.pan = min(abs(temp.pan), 5 * time_step) * sign(temp.pan);
			temp.tilt = 0;
			temp.roll = 0;
			c_rotate(me, temp, IGNORE_PASSABLE);
			if(vec_dist(my.x, pl_vDest) > (my.max_x * 1.75)) {
				c_move(me,vector(10*time_step,0,0),nullvector,IGNORE_ME|GLIDE|IGNORE_PASSABLE);
			}
		}
		wait(1);
	}
}


Re: How make player go to the point you clicked with mouse? [Re: testDummy] #269470
06/03/09 08:28
06/03/09 08:28
Joined: Mar 2006
Posts: 321
Norway
Eagelina Offline OP
Senior Member
Eagelina  Offline OP
Senior Member

Joined: Mar 2006
Posts: 321
Norway
I did look and tried yours, like it, but cant make it work as I whant to. Thanks for the suggestion.
And yes I have to reset the variabel_1. But when I do that the player never stops....

Last edited by Eagelina; 06/03/09 08:37.

A6 and A7 Commercial
-------------------
Programmer always searching for more to learn and understand. smile
Page 2 of 5 1 2 3 4 5

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