SendMessage to Object in Array
I bring this to the community, because... it does not make sense.
So the first part sends a message to two of the objects in an array this script made the message is just calling a load function with the values from an array of floats also produced from this script
the second part is part of the script attached to both objects in the ID array the first object in the array works perfectly he gets the message he checks the if statement and confirms it should instantiate block gameobject but the second object in the ID array is a little punk and he doesn't do anything(remember its the same exact script attached to ID[0] & ID[1] so it isn't like something changed) I used the debug to see if he was getting the messages and he was but he didn't do anything even when i checked to make sure he had the right value from if(Sav==(MyID+0.2)) and he did and it matched Sav but still he did nothing beecause i believe he is a little turd but maybe i made an error if i did it didn't pop up on the debug log so maybe someone can help?
Thanks.
Answer by J-R-Wood · Mar 13, 2018 at 11:00 PM
I figured it out.
The problem was my if statement...
in an update function i put A1=MyID+0.1;
and then in my load function i changed it from if(Sav==(MyID+0.2)) {}
to this if (Sav==A1) {}
and it worked!
Your answer
