Level Stream doors

You’re learning new stuff, it gives brain ache :slight_smile:

Each door managing it’s own status is possibly better, because it hides all the code in different places.

If you try and do it all in the level BP, by the time you finish the game ( think of how much stuff you have to remember the status of ), you’ll have the level BP from hell…

If you wanna do it in levelBP, you still have to give each door an array index, otherwise they don’t know which bit of the array belongs to them ( you just make an int on the door BP ).

If you do it in the door, you can just have a load of different variables in the save game ( ‘door_by_the_lift’, ‘door_by_the_stairs’ etc ).

This really is just your choice :slight_smile:

Yeah, that’s what I just said below, each door needs to know which slot of the array it’s gonna use…

If possibel Id def prefer it sorted in the door bp instead of the level one, the level bp will be filled with the weather system ill add later lol (mucch later( :stuck_out_tongue:

Ok so you’re ok just having a bool variable for each door in the save game and the code in the door. That’s what I gave you in the project.

yea aslong as each door knows whats open and which is closed. each of my levels are gonna have alot of doors lol

i just cant get these arrays connected, now i need a bath to wash out my brain lol

I know im probably on your last nerve but any chance you could post a pic on how to set it up with the arrays? :stuck_out_tongue:

I tried it with an array, don’t recommend it this is what the code looks like for the cube now:

You have to give each door an index which is where it lives in the array, and set it. You have to make the array manually. If you didn’t the code is even worse because you have to make the doors add their own element to the array if it’s not already there.

As you can see, much more messy. And you still can’t rattle though the array in the level BP and set all the doors, because a door can only be set when it’s level is streamed. So you might as well let the doors load their own status. That way you don’t have to worry about it.

thanks mate, sorry didnt reply sooner been a busy day, I’ll test this one and see which ones works best for me, this was all on the doors blueprint right?

The code you see there is on the door, the array sits in the save game :slight_smile:

Its not working, The doors open and the print shows it saves but it doesnt seem to load on begin play cause the doors all start closed again.
I made the bool an array in save and gave each door a different int number.

I also keep gettin this error each time i stop the game, it seems to have something to do with the is open set

This is it, not the way to go I think:

https://drive.google.com/open?id=1moOcNpz6Jqz2vcBiA6RcutljU4LJ-qV-

think your right, this all gives me a basis to go on though, thanks for all the help mate, sorry for being a pain lol