Quantcast
Channel: Latest Questions on Unity Answers
Viewing all articles
Browse latest Browse all 171066

array c# sending info from one script into another scripts array.

$
0
0
Hiya, so here's my problem. I already know how to make an array, adjust its size, put different stuff in it and access them inside a single script. (making navigational locations for enemy's so they can patrol and such.) now I want to make a closest enemy script in my selecting script. for that I need to make an array in my existing Selecting script and having other scripts (enemy scripts) send their info to my Selecting scripts array when they are within 100 meters or so and remove themselves from the array when they are further then 100 meters. I figured out how to select them from my array but actually putting stuff in there from another script is still beyond me. if you need like examples of what I got so far, just ask and i'll put it in. hope someone can help me out with this problem.

Viewing all articles
Browse latest Browse all 171066

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>