antstubell Posted June 4, 2019 Author Posted June 4, 2019 Apart from the comments what's the difference?
IsharaMeradin Posted June 4, 2019 Posted June 4, 2019 On 6/4/2019 at 3:42 PM, antstubell said: 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.
Recommended Posts