Cant have two instance editable variable values at the same time?





I have a single interactable object, with a variable that is instance editable, it has no default value and nowhere else is it being changed. I know the issue, but I have no idea how to solve it, if I hover over the object I’m able to interact with it and when I press e it opens the same level each time rather than the specific level that the specific object I’m look at is set to, even though it checks to see what the variable is equal to it still goes for the same level. Any ideas?

Hello, I would suggest using debug print strings to see the value and where the logic flows.
I think you misunderstood the usage of Instance Editable variables. It doesn’t mean that 1 object can have 2 different values at the same time. It means that if you place 2 objects of the same class, each of them can have different default value.

So in your case you could place 2 interactable objects to your level, in DetailsPanel set their LevelName value to those 2 levels and then interacting with each of them should open corresponding level.
(Or maybe I misunderstood your intention?)

I think i understand, what I definately understand is that I’m an idiot, i could have just had two boolean variables one for each level object, I just thought I could compress the code as small as possible by having one variable thanks.

Ok I think I am thoroughly confused, I tried this, having two seperate objects but it didnt work, I think because I’m calling an event dispatcher it takes it from both objects, so i thought maybe I have to get the hit actor name or tag or something, i try to see what the hit actor is equal to and put a string if true then nothing.

I am incredibly stupid, I just found out instead of all this wondering for hours how I can solve the issue, all I had to do was get hit actor class and if that is equal to the level selector I want then open level…

I will say one last thing, this is just for my personal situation, whilst fixing the interacting was good I can use it elsewhere, what i originally set out to do (level select) I realised now I can do it in a widget instead.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.