» Sat Nov 17, 2012 12:54 am
using a property is faster and cheaper than a function call get.Player(), but being a property, it is stored into the save game data and can become tedious to remove if ever changed after the mod is published.
you can reduce the cost of get.Player() by casting it as an actor variable inside of a function if you need to use it multiple times. this is my preferred method
example
Function SomeFunction()
Actor Player = Game.GetPlayer()
Player.Additem.(something)
Player.Removeitem(SomethingElse)
Player.AddToFaction(TheSomeDudes)
EndFunction
but if you only need to use a single action for player, you only need GetPlayer() once and doesnt need to be cast as a variable