Jump to content

Script help please.


Recommended Posts

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...