Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, Grant, Neb), 908 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 3 1 2 3
vec_for_mesh() - How to find a Vertex? #5308
07/06/01 16:12
07/06/01 16:12

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



For example my Plane crashed into my terrain. Now I want to make a dent at this place. I know how to make this but the plane can crash everywhere so I can't use the vec_for_mesh function to get the Vertex because it needs a Vertexnumber. Is it possible to get the nearest Vertex at the place where my Plane crashed?

Re: vec_for_mesh() - How to find a Vertex? #5309
07/06/01 20:45
07/06/01 20:45

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



Yes, it is possible.
You should know how mutch vertices your terrain have (for example 80 vertices on X, 60 vertices on Y-axis). With vec_dist from your Entity to the MIN_X and MAX_Y (in a Vector of course) of your Terrain you can see which Vertex is the nearest to your Entity (maybe you should adjust this because you've scaled your Terrain in WED).
I wrote a code and it works. Maybe I should post it here.

I hope I have helped you with my bad english!

P.S.: OK, I've made a code, but I can't use it with vec_for_mesh, because it doesn't work corectly in my Version. But JCL said that this is a Bug and will be corrected soon.


Re: vec_for_mesh() - How to find a Vertex? #5310
07/06/01 21:24
07/06/01 21:24

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



SKILL EXPLOSION_RANGE { VAL 100; }
SKILL CURRENT_VERTEX { VAL 0; }
SKILL VERTEX_POS { }

// In das event des Flugzeugs einfügen

...
WHILE (CURRENT_VERTEX < ENT_VERTICES(YOU)){
CURRENT_VERTEX += 1;
VEC_FOR_MESH(VERTEX_POS,YOU,CURRENT_VERTEX);
IF (VEC_DIST(MY.POS,VERTEX_POS) < EXPLOSION_RANGE){
VERTEX_POS.Z -= EXPLOSION_RANGE - VEC_DIST(MY.POS,VERTEX_POS);
VEC_TO_MESH(VERTEX_POS,YOU,CURRENT_VERTEX);}}
...

So das hab ich jetzt mal so aus dem Ärmel geschüttelt also ohne Gewähr dürfte aber eigentlich klappen (wenn die beiden Funktionen funzen würden)


Re: vec_for_mesh() - How to find a Vertex? #5311
07/06/01 21:26
07/06/01 21:26

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



Hello,

thanx for your answer. But I don't need a code your description was very helpful.


Re: vec_for_mesh() - How to find a Vertex? #5312
07/07/01 04:09
07/07/01 04:09
Joined: Mar 2001
Posts: 1,825
London, England
Keith B [Ambit] Offline
Expert
Keith B [Ambit]  Offline
Expert

Joined: Mar 2001
Posts: 1,825
London, England
Have I missed something? When was vec_for_mesh introduced? I thought it was still in the upcoming features - are you guys beta testers, or have I missed an update? This sounds like just the instruction I need...

Re: vec_for_mesh() - How to find a Vertex? #5313
07/07/01 04:36
07/07/01 04:36

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



so einen ähnlcihen code habe ich uch drin master , nur funktioniert der nit und deiner der macht bei mir nix, der macht keine einwölbung(krater)... der amcht einfach garnix...

was könnte ich falsch gemacht haben?
(code steht an der stelle der event aktion)


Re: vec_for_mesh() - How to find a Vertex? #5314
07/07/01 05:01
07/07/01 05:01

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



Vec_to(_for)_mesh funktioniert nicht aber der Code schon also müssen wir nur warten bis das feature eingebaut wird bis wir den Code verwenden können

Re: vec_for_mesh() - How to find a Vertex? #5315
07/07/01 05:06
07/07/01 05:06

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



naaaaaaaaaaaa prima und ich dachte, das das alles an mir liegt *rofl*... tztztzzzz

is it a Bug or is it a feature
it is not a bug it is only a missing feature


Re: vec_for_mesh() - How to find a Vertex? #5316
07/07/01 06:06
07/07/01 06:06
Joined: Mar 2001
Posts: 1,825
London, England
Keith B [Ambit] Offline
Expert
Keith B [Ambit]  Offline
Expert

Joined: Mar 2001
Posts: 1,825
London, England
Hmm.. confused... Everything seems to have gone German, and seeing as that was my worst GCSE (and many years ago), could someone please answer in English: have I missed an update? How come you guys have vec_to_mesh, I thought that was in the new version not yet released?
Thanks!
Keith

Re: vec_for_mesh() - How to find a Vertex? #5317
07/07/01 06:08
07/07/01 06:08

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



Hi Keith, Vec_to(for)_mesh is currently only included in the Beta, but don't worry it doesn't work anyway

Page 1 of 3 1 2 3

Moderated by  HeelX, Spirit 

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