antstubell Posted June 4, 2019 Author Share Posted June 4, 2019 Apart from the comments what's the difference? Link to comment Share on other sites More sharing options...
IsharaMeradin Posted June 4, 2019 Share Posted June 4, 2019 Apart from the comments what's the difference?In functionality, nothing. You used Game.GetPlayer() throughout the script that you posted. By comparing Game.GetPlayer() to the akActionRef parameter of the OnActivate event you can use akActionRef instead of constantly calling out to the Game script to run the GetPlayer() function. This saves processing time. Additionally, you were doing a lot of repeating GetItemCount calls for the same objects. By storing those in local variables additional processing time is saved. This was stated within the comment marks. The intention is that one would compare the code within your post against the code within my previous post to see and understand the differences. Sorry for any confusion. Link to comment Share on other sites More sharing options...
Recommended Posts