Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/20/24 20:05
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
0 registered members (), 1,438 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 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 | 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