Quantcast
Channel: Answers by "ThePersister"
Viewing all articles
Browse latest Browse all 99

Answer by ThePersister

$
0
0
The code doesn't seem to be incorrect, I take it you haven't gotten any errors, otherwise you probably would've told us. I noticed you use: spike[r].GetComponent().atstart(); spike[r] indicating that you have an array of Spikes, and you use index r and call that specific spike and change its value speed to 0.8f I believe it's working, but if you have multiple Spikes, you probably have multiple "Test" scripts, which leads to multiple updates doing: > Debug.Log("Value of speed: "+speed); So, you'd end up with 999+ Logs, most of which still having speed at 0. Try getting rid of the Debug.Log in Update and put the Debug.Log in the "atstart" method, then you'll know for sure if it's called at all and whether the value is applied or not. I hope that helps :3

Viewing all articles
Browse latest Browse all 99

Trending Articles



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