Dialogue system Quest Reward direct to Invector inventory ?
Posted: Sun Aug 19, 2018 5:29 am
Compatible to give a reward of Dialogue system Quest direct Invector inventory ?
Support and discussion forum for Pixel Crushers products
https://www.pixelcrushers.com:443/phpbb/
https://www.pixelcrushers.com:443/phpbb/viewtopic.php?t=1604
Code: Select all
public string GiveInvectorItem(string itemName)
{
// Your code here to add Invector item to inventory.
}
Code: Select all
void OnEnable()
{
Lua.RegisterFunction("GiveInvectorItemToPlayer", this, SymbolExtensions.GetMethodInfo(() => GiveInvectorItemToPlayer(string.Empty)));
}
public void GiveInvectorItemToPlayer(string itemName)
{
var player = GameObject.FindObjectWithTag("Player");
// Your code here to add itemName to player.
}