2 registered members (NnamueN, 1 invisible),
1,489
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
how to scan closer
#346241
11/03/10 04:06
11/03/10 04:06
|
Joined: Sep 2009
Posts: 155 France
ayks
OP
Member
|
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
Senior Member
|
Senior Member
Joined: Feb 2010
Posts: 320
TANA/Madagascar
|
Hi, I don't really understand what you want to ask . Perhaps you should post in french and I will try to help . 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
OP
Member
|
OP
Member
Joined: Sep 2009
Posts: 155
France
|
hi, ok i will do it later with more details thanks
|
|
|
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
OP
Member
|
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
Liamissimo
Serious User
|
Serious User
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:
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: Xarthor]
#346319
11/04/10 10:19
11/04/10 10:19
|
Joined: Apr 2005
Posts: 4,506 Germany
fogman
Expert
|
Expert
Joined: Apr 2005
Posts: 4,506
Germany
|
Let me be your smart ass:
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: bart_the_13th]
#346331
11/04/10 12:33
11/04/10 12:33
|
Joined: Sep 2009
Posts: 155 France
ayks
OP
Member
|
OP
Member
Joined: Sep 2009
Posts: 155
France
|
ouch, 3 codes from germany (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 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 :?
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|