Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 03/28/26 14:01
TMFs on options in live trading
by Spirit. 03/26/26 19:52
TDAmeritrade plugin with new Schwab accountt?
by AndrewAMD. 03/24/26 17:11
Black Book, 4th edition
by jcl. 03/17/26 09:28
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
4 registered members (Quad, TipmyPip, ozgur, vince), 3,874 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
mredit, vestriaa, Lukudo, mldenoiser, the1
19204 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Terrainmap with verex-attachment #278201
07/12/09 16:18
07/12/09 16:18
Joined: Jun 2008
Posts: 402
Germany
S
sebbi91 Offline OP
Senior Member
sebbi91  Offline OP
Senior Member
S

Joined: Jun 2008
Posts: 402
Germany
Hi
I have a little problem!
i have a Terrain and I want to put some Models at Vertexes of the Terrain!
The Code for this is easy i know!
Code:
...
level_load("");
map=ent_create("testmap.hmp",NULL,terrain_act);

tower1=ent_create("tower.mdl",NULL,tower_act);
vec_for_vertex(tower1.x,map,18826);//18826
...



Now I dont understand why the code isn't working with .hmp-Terrains!
With this Code the Tower is at the end of the map!
But no Errors or something else, only a wrong place!

I converted the Terrain to a Model and the Tower is at the place it should be!
But why is this not possible with .hmp maps ?

BTW I am working with Lite-C (free Version if this helps ^^)


any Ideas that would help?

regards
Sebastian


Last edited by sebbi91; 07/12/09 16:19.

3D-Gamestudio A8 - Commercial
Re: Terrainmap with verex-attachment [Re: sebbi91] #278208
07/12/09 16:47
07/12/09 16:47
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Is the terrain chunked? And, thus the vertex numbers no longer valid?
Just a guess.

Re: Terrainmap with verex-attachment [Re: Pappenheimer] #278214
07/12/09 17:10
07/12/09 17:10
Joined: Jun 2008
Posts: 402
Germany
S
sebbi91 Offline OP
Senior Member
sebbi91  Offline OP
Senior Member
S

Joined: Jun 2008
Posts: 402
Germany
godlike!

Thank you!
All what I had to do was to rename the file to "testmap_n.hmp"

thanks ^^

Tread could be closed^^


3D-Gamestudio A8 - Commercial
Re: Terrainmap with verex-attachment [Re: sebbi91] #278238
07/12/09 19:15
07/12/09 19:15
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
vec_for_vertex wont work if the terrain is more than 32x32 vertices(chunked).
If you need to stay chunked, do the following.
Code:
CONTACT* c = ent_getvertex(terrain,NULL,vertexnum);
vec_set(tower1.x, vector(c.v.x, c.v.z, c.v.y));  
//y & z are swapped on purpose. blame directx



PS: Ive no idea how this can work if you a c=script though....

Last edited by EvilSOB; 07/12/09 19:17.

"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial

Gamestudio download | 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