Jump to content

A bit of help in Unity java?

Meowingtonhaxor

I'm not familiar enough with unityscript to know for sure, and I'm not sure how your rocks are created/stored, but it sounds to me like all the rocks might have the same reference.

 

Example to demonstrate the concept

// the array here contains the same object in all placesvar obj = new Object();var array = {obj, obj, obj};// the array here contains multiple different objectsvar array = {new Object(), new Object(), new Object()};

Sorry if this isn't related to your issue and not helpful :P

Link to comment
Share on other sites

Link to post
Share on other sites

I'm not familiar enough with unityscript to know for sure, and I'm not sure how your rocks are created/stored, but it sounds to me like all the rocks might have the same reference.

 

Example to demonstrate the concept

// the array here contains the same object in all placesvar obj = new Object();var array = {obj, obj, obj};// the array here contains multiple different objectsvar array = {new Object(), new Object(), new Object()};

Sorry if this isn't related to your issue and not helpful :P

I think it's actually the fact that it is destroying the object it is connected to. And all those rocks are connected to the same pair of scripts. Know a way to work around this?

Link to comment
Share on other sites

Link to post
Share on other sites

Made a working script with the help of the maker of Slender, AlucardJ. Thanks for all your help guys!

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×