Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (Nymphodora, AndrewAMD, TipmyPip, Quad, Imhotep), 847 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
level_load /level_ent #479011
02/04/20 19:34
02/04/20 19:34
Joined: Nov 2006
Posts: 497
Ohio
xbox Offline OP
Senior Member
xbox  Offline 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: xbox] #479012
02/04/20 19:39
02/04/20 19:39
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Hey man! Glad to see you are back.

If you keep those variables global, they will survive the level loading (as far as I know) and what do you mean by 'sub entities'?

Best regards!


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
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 Offline OP
Senior Member
xbox  Offline 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.

Code
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 Offline
Senior Expert
3run  Offline
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.

Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung

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