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
Dynamic Variable in LUA command question
Re: Dynamic Variable in LUA command question
Epic Facepalm,
Sorry.
[] not ()
works
Sorry.
[] not ()
Code: Select all
uccAddItem(Variable["PlayerName"], "Axe", 1);
uccAddItem(Variable["PlayerName"], "Spear", 1);
uccAddItem(Variable["PlayerName"], "Club", 1)