Dynamic Variable in LUA command question
Posted: Tue Sep 29, 2020 6:03 pm
Hi Tony,
Hopefully this is an easy question.
With UCC PUN all player's are tagged "Player" by default so if I leave the LUA command for uccAddItem("","Item",1) it serches for all of the objects tagged "Player". Because this is multiplayer each player in the room gets the item.
So, I'm trying to assign a dynamic variable that allows only the intended character to recieve the items, but I'm a little stuck for some reason.
Can you see why this isn't working? I should note that the " [var=PlayerName]" works correctly in the Dialogue Field. It's just that in the LUA command "Variable("PlayerName")" is not.
Thank you,
Nathan
Hopefully this is an easy question.
With UCC PUN all player's are tagged "Player" by default so if I leave the LUA command for uccAddItem("","Item",1) it serches for all of the objects tagged "Player". Because this is multiplayer each player in the room gets the item.
So, I'm trying to assign a dynamic variable that allows only the intended character to recieve the items, but I'm a little stuck for some reason.
Can you see why this isn't working? I should note that the " [var=PlayerName]" works correctly in the Dialogue Field. It's just that in the LUA command "Variable("PlayerName")" is not.
Thank you,
Nathan