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
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (NnamueN, 1 invisible), 1,489 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19054 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
how to scan closer #346241
11/03/10 04:06
11/03/10 04:06
Joined: Sep 2009
Posts: 155
France
ayks Offline OP
Member
ayks  Offline OP
Member

Joined: Sep 2009
Posts: 155
France
hi, i am wondering how to scan closer because i have to put a distance between the player and the item for be able to scan it, which is problematic.

i use event_type == EVENT_SCAN
have to go sleep so i try to ask here.

thanks

Last edited by ayks; 11/03/10 04:15.
Re: how to scan closer [Re: ayks] #346243
11/03/10 05:54
11/03/10 05:54
Joined: Feb 2010
Posts: 320
TANA/Madagascar
3dgs_snake Offline
Senior Member
3dgs_snake  Offline
Senior Member

Joined: Feb 2010
Posts: 320
TANA/Madagascar
Hi,
I don't really understand what you want to ask smile. Perhaps you should post in french and I will try to help grin.

Best regards.

Re: how to scan closer [Re: 3dgs_snake] #346279
11/03/10 17:11
11/03/10 17:11
Joined: Sep 2009
Posts: 155
France
ayks Offline OP
Member
ayks  Offline OP
Member

Joined: Sep 2009
Posts: 155
France
hi,
ok i will do it later with more details wink
thanks

Re: how to scan closer [Re: ayks] #346282
11/03/10 17:53
11/03/10 17:53
Joined: Jul 2009
Posts: 1,198
Berlin, Germany
L
Liamissimo Offline
Serious User
Liamissimo  Offline
Serious User
L

Joined: Jul 2009
Posts: 1,198
Berlin, Germany
Ecrire en francais si tu veux, je peux t'aider wink


"Ich weiss nicht genau, was Sie vorhaben, aber Sie können keine Triggerzonen durch Ihr Level kullern lassen."
-JCL, 2011
Re: how to scan closer [Re: Liamissimo] #346310
11/03/10 23:42
11/03/10 23:42
Joined: Sep 2009
Posts: 155
France
ayks Offline OP
Member
ayks  Offline OP
Member

Joined: Sep 2009
Posts: 155
France
ok, thx, i write the explanation now.. in frenchenglish

2 simples screenshots pour commencer

Image 1 : la super plaine avec le coffre sur l'arbre.

Image 2 : je suis sur l'arbre, mais ne peux pas prendre le coffre car il est trop près.

j'utilise cette action pour le coffre :

action coffreplaine
{
my.enable_scan=on;my.event=actcoffreplaine;
}

my.event se contente de donner l'objet au joueur.

Tout ça marche parfaitement, à condition qu'il y ait une certaine distance entre le joueur et le coffre, ce qui est très ennuyant, et je me demandais s'il y avait possibilité de rétrécir cette distance.

En espérant que ce soit plus clair.

Last edited by ayks; 11/03/10 23:45.
Re: how to scan closer [Re: ayks] #346313
11/04/10 06:21
11/04/10 06:21
Joined: Jul 2009
Posts: 1,198
Berlin, Germany
L
Liamissimo Offline
Serious User
Liamissimo  Offline
Serious User
L

Joined: Jul 2009
Posts: 1,198
Berlin, Germany
Essaye d'utiliser vec_dist. Tu peux l'utiliser pour prendre la distance entre toi et la coffre et quand vec_dist(my.x,coffre.x) < 100 par exemple tu peux mettre ton event la dedans. Comme ca:
Code:
action coffre()
{
	while(me)
	{
		if(vec_dist(my.x,player.x) < 100)// Quand le jouer est près
		{
			//event
		}
		wait(1);
	}
}



Last edited by TheLiam; 11/04/10 06:21.

"Ich weiss nicht genau, was Sie vorhaben, aber Sie können keine Triggerzonen durch Ihr Level kullern lassen."
-JCL, 2011
Re: how to scan closer [Re: Liamissimo] #346315
11/04/10 07:33
11/04/10 07:33
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
To avoid random null-pointer errors, better use:
Code:
action coffre()
{
        while(!player) { wait(1); } // wait till player pointer becomes valid

	while(me)
	{
		if(vec_dist(my.x,player.x) < 100)// Quand le jouer est près
		{
			//event
		}
		wait(1);
	}
}



Re: how to scan closer [Re: Xarthor] #346319
11/04/10 10:19
11/04/10 10:19
Joined: Apr 2005
Posts: 4,506
Germany
F
fogman Offline
Expert
fogman  Offline
Expert
F

Joined: Apr 2005
Posts: 4,506
Germany
Let me be your smart ass: grin

Code:
action coffre()
{
	while(me)
	{
		if(player)  
		{

			if(vec_dist(my.x,player.x) < 100)// Quand le jouer est près
		
			{
				//event
			}
		}
		wait(1);
	}
}



Last edited by fogman; 11/04/10 10:20.

no science involved
Re: how to scan closer [Re: fogman] #346320
11/04/10 10:28
11/04/10 10:28
Joined: Aug 2008
Posts: 482
B
bart_the_13th Offline
Senior Member
bart_the_13th  Offline
Senior Member
B

Joined: Aug 2008
Posts: 482
Ummm, use c_trace instead of scan?

Re: how to scan closer [Re: bart_the_13th] #346331
11/04/10 12:33
11/04/10 12:33
Joined: Sep 2009
Posts: 155
France
ayks Offline OP
Member
ayks  Offline OP
Member

Joined: Sep 2009
Posts: 155
France
ouch, 3 codes from germany shocked
(i write this post in english for everyone)
thx, so i guess it means that "event_type == EVENT_SCAN" is not that good for scan things too close.. damn, i used it everywheree :s
i was insisting in wrong way smirk

anyway, thx*3 ! (not x3 which is a damn smile :|)
i will try later and it will surely work

for c_trace, thx for the tip, but i dont think i will need it if their solution is sufficient.

--

other details : i dont understand everything like "if (player)", or "while (player)" because i start with my player "yellow ball" and never leave it so i guess i dont have to use it :?

Page 1 of 2 1 2

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