|
level_load /level_ent
#479011
02/04/20 19:34
02/04/20 19:34
|
Joined: Nov 2006
Posts: 497 Ohio
xbox
OP
Senior Member
|
OP
Senior Member
Joined: Nov 2006
Posts: 497
Ohio
|
Sooo… it's been a while. I decided to get back into game studio to work on ideas I've had for years now, and i'm not sure what I'm missing.
I have several small rooms made in WED, and loading them as levels in SED, easy enough. In SED, i'm loading the map sub entities and assigning them functions, again, easy enough. Now when I come in contact with one of those entities, I want to change the level to either a new level, or restart the current one, however when the new level loads, the map sub entities no longer have functions attached to them. Also, I want to save positional data from them such as pan, tilt, roll, so when the new level is created, the information is copied over, but don't the variables reset when the new level is loaded?
|
|
|
Re: level_load /level_ent
[Re: 3run]
#479013
02/04/20 19:49
02/04/20 19:49
|
Joined: Nov 2006
Posts: 497 Ohio
xbox
OP
Senior Member
|
OP
Senior Member
Joined: Nov 2006
Posts: 497
Ohio
|
Heyy it's good to see you too! I didn't even think about that actually, I'll have to give it a try. So I have a room with a door, and the door is a map entity which is built as part of the room level (that way it's already loaded in position when the level loads) so when the level loads, I'm doing a for loop to load all of the map sub entities and assigning them functions. But for some reason it's only working on the initial level load.
for(you = ent_next(NULL); you; you = ent_next(you)) {
doors[count] = ent_create("door.wmb", vector(you.x, you.y, you.z), door);
count++;
set(you, INVISIBLE); // make entity invisible
}
|
|
|
Re: level_load /level_ent
[Re: xbox]
#479014
02/04/20 19:53
02/04/20 19:53
|
Joined: May 2009
Posts: 5,370 Caucasus
3run
Senior Expert
|
Senior Expert
Joined: May 2009
Posts: 5,370
Caucasus
|
Why not use models instead of sublevels? I guess it would be much easier to use them (f.e. you could place them all in WED and on level load, depending on some variables you could either delete or keep placed models). What exactly you want to do? Maybe I could help you with coding part.
Edit: please check your private messages
Greets
Last edited by 3run; 02/04/20 19:54.
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|