Level testing fails

I am confused about a thing Bec. When I try to test my game it works all okay and if I try 4 times again then out off nowhere things disappear like a teleporter a door and stuff. But the first 4 times everything works okay.
Does anyone know what could be wrong?

Are you talking about after packaging, or just playing in the editor?

Uh. I am not sure since I don’t really know what after packing is. I just click on the play icon in the editor.

Ok, then it sounds like a coding issue.

Let’s take the door, is the door supposed to disappear when you open it?

The door is supposed to be deleted and replaced when you go thru a teleporter somewhere else. In the room where the door should be deleted and replaced a moving box also doesn’t spawn anymore and that box also gets deleted if you interact with the box.

I think it’s coding errors :wink:

Can you show the code for the door?

it probebly has many mistakes or not logical things

Ok, it’s definitely a code problem :slight_smile:

I’m gonna look at it a bit more. But what is this code meant to do?

( I can give you a list of problems, but it’s quite big ).

its meant to be opened by pressing E and play a door opening sound. it needs to stay open until i get out off the box then it should close and play a sound. behind the door i have a teleporter and in another room i have something you need to interact with and it will delete the door and when you wanna teleport back it first spawns another door with another timeline on that door so you see it close and then it needs to teleport the old door back when the one door closes and that door needs to be removed. i have no idea if you understand what i just said :sweat_smile:

The problem with your door disappearing is to do with how you’ve coded this last idea you have here. But let’s deal with the open and close door first.

I think you were heading for this sort of thing

See if that works for you.

It’s not air tight. Try jumping on the box and pressing open when the door is closing…

It really depends on whether you want the door to complete it’s operation, or be able to change direction mid-way.

One of your main problems, was you can’t put a delay on the branch of a sequence node. If you do, it just ignores it, and goes straight to the next pin.

I get what you mean about the doors.

thanks!
but is there any way that the closing door sound only gets activated if the door is open in the first place? bec now i could walk to the door and not open it and then walk away and still here it no?

You’re right, bit of a bug, I didn’t actually try it :wink:

You can use

image

right after that cast to know if the timeline is not at the beginning.

Just say if it’s still not right, and I’ll test a solution, but it won’t be until tomorrow now…

i put it behind the endoverlap but i don’t know if its the right place to put it? since that the door doesn’t close anymore after i did it

the things that despawn after starting the game 4 times or something are a door a box and a teleporter and i think they all have a link since that my box spawns the teleporter and the teleporter removes the door later and replaces it

This is pretty airtight

It doesn’t freeze the player, and doesn’t check for overlap on close, but you get the idea.

The only problem I have with this ‘overlap and press a key’ method ( which I assume is all over youtube ), is you can face away from the door and open it with your butt :slight_smile:

Reading your description again, you want it to close when you get off the box. This is fiddly if you have long open and close sounds, because you’ll end up player multiple copies of them.

I will modify this to close the door when you’re not on the box, but only after it’s finished opening. ( there are so many possibilities ).

Ok, this will do it

Only problem here, is if you have a long door open and close sound, they will start playing on top of each other, if you keep jumping in and out of the box.

If that’s the case, tell me, and I’ll show you how to fix that.

If you just put this slight change in the door, it will close when you first spawn it, if you set ‘close on start’ to true ( or put it in the level ):

You need to set ‘new position’ to the time at the end of your timeline.

It’s a third person game with a 2d character😅 so closing the door with the butt isn’t a problem!

1 Like