I have a very interesting problem that I would like to address. I have an ‘call in editor’ event that allows me to return a grid section back to its proper position (just incase i move it while editing). When I only have the ReturnToSlot event and activate it, it resets the grid index to 0.
I debugged it with a straight print from ‘returntoslot’ without the location function. And it gives me the correct index.
I then randomly thought I would debug it with a seperate ‘call in editor’ event (customevent) with a straight print function, and this literally stops the ‘returntoslot’ function from reseting the index.
I am so lost. This is not the only place I use the grid index either, when it is spawn, it uses that index to call other information and works fine.
The GridIndex variable is inherited from a parent actor, but is Set in an event straight after spawn. Like I said, the index is accurate and set UNTIL this happens (minus the random customevent)
The only thing I could possibly recall this to, is if I have exposed the variable to the editor. But this is NOT the case.
I am still learning a lot, and Arrays is a new venture for me. Please advise, until then the ‘custom event’ stays…
I understand that concept,
I have an editor call function on the parent to activate the grid spawn. none are activated at runtime. All is activated with a click of a button in editor. As I want it to be an editor system to make my future editing easier.
Like I mentioned before. I debugged it all the way to working successfully UNTIL I run that ‘get element’ function that somehow, for some really weird reason, it resets the index variable… very confusing.
And these are the other 2 events that activate on the actor that is ‘created’. These initiate and work when debugged. All information passes to the actors successfuly
I just add the ‘custom event’ print at the end of my ‘gridspawned’ event and it just fixes it. It’s like as if the variable needs a reminder of its information…
It works for now, I’m sure I’ll learn something down the track that makes me go ‘ohhh’
Ok, new thing I found… It resets to 0 when I move it. I think it’s in construct as I deleted a local variable in there from messing around a while back. But this still didn’t fix it.
But I think its in construct… still searching