Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,388 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
map_subents not working?? #425206
06/28/13 23:41
06/28/13 23:41
Joined: Nov 2006
Posts: 497
Ohio
xbox Offline OP
Senior Member
xbox  Offline OP
Senior Member

Joined: Nov 2006
Posts: 497
Ohio
Hi, I have a main level that contains many rooms, and those rooms are just a single separate WMB map entity, (Hope I haven't lost anyone yet). In that small map entity, I have several models placed, However when I run my main level, the rooms are created, but their models are not created.

In the main levels code, right before the main WMB is loaded, I have map_subents = 1; However, no subentities are created. Why?

If you need any other information that I may have missed, please ask and I will gladly provide the information.

P.S. I'm using A8 free.

Last edited by xbox; 06/28/13 23:42.
Re: map_subents not working?? [Re: xbox] #425215
06/29/13 08:12
06/29/13 08:12
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Apparently map_subents only has an effect on map entities created with ent_create, not on those which have been placed in the level in WED. I think this is a bug and you should report it.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: map_subents not working?? [Re: Superku] #425223
06/29/13 12:10
06/29/13 12:10
Joined: Jul 2008
Posts: 2,110
Germany
rayp Offline

X
rayp  Offline

X

Joined: Jul 2008
Posts: 2,110
Germany
This is correct looks like a bug. I faced this problem a few weeks ago. But i did not know the ent_create "trick" , thank you for that tip.

Last edited by rayp; 06/29/13 12:22.

Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;
Re: map_subents not working?? [Re: rayp] #425239
06/29/13 19:46
06/29/13 19:46
Joined: Nov 2006
Posts: 497
Ohio
xbox Offline OP
Senior Member
xbox  Offline OP
Senior Member

Joined: Nov 2006
Posts: 497
Ohio
I've found a simple work around using the ent create trick, however, the models contained in the room, do not rotate along with the room. frown is there a way to rotate the model with the room like it should?

Re: map_subents not working?? [Re: xbox] #425242
06/29/13 20:56
06/29/13 20:56
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Sure, why would they rotate with the room?
You can of course realize this by code, for instance by saving the subents (pointers to the entities) in the skill array, vec_diff their positions and save their original orientation. Then, when you rotate the room, calculate their new positions and rotations with vec_ and ang_rotate.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: map_subents not working?? [Re: Superku] #425246
06/29/13 21:49
06/29/13 21:49
Joined: Nov 2006
Posts: 497
Ohio
xbox Offline OP
Senior Member
xbox  Offline OP
Senior Member

Joined: Nov 2006
Posts: 497
Ohio
I would think they would rotate with the room because they are placed in the room via WED and then saved as a whole as a map entity so as it's created, the models are created with it, so logically if you move the room, the included models should move to, not individually by default. Controlling them separately should be optional. Since i'm not familiar with all of the vector manipulations, I'll have to come up with a different solution.

Re: map_subents not working?? [Re: xbox] #425247
06/29/13 23:03
06/29/13 23:03
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Saving and compiling them as a map entity is the same as when you build a regular level, the meshes don't get merged but just the information where which entities need to be created with some initialization information gets saved, not more.

The vector-solution is an easy, relatively fast and flexible solution, you should give it a try.
One hint:
vec_diff(my.skill60,my.x,my.parent.x); // once at the start of the action
...
vec_set(my.x,my.parent.x); // in a loop
vec_add(my.x,my.skill60);

The code above is a very simple way to keep a non-rotated entity at the same relative position in respect of the parent entity (your room), even when you move the latter.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends

Moderated by  HeelX, rvL_eXile 

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