2DWorlds Forums
Skin changing - Printable Version

+- 2DWorlds Forums (http://2dworlds.buildism.net/forum)
+-- Forum: 2DWorlds (http://2dworlds.buildism.net/forum/forumdisplay.php?fid=4)
+--- Forum: Scripting (http://2dworlds.buildism.net/forum/forumdisplay.php?fid=13)
+--- Thread: Skin changing (/showthread.php?tid=6367)



Skin changing - Duck - 06-30-2011

So In a game I'm building would like you to have the skin of the main character when you play, however I have no idea as to what I must change the "Skin" string to. I tried this

[lua]function D(PP)
PP.Character.Skin = "http://buildism.net/items/Blotto/2189"
end

link(game.Players.ChildAdded, D)[/lua]

and it changed the value fine, but I was still wearing my default skin, even after killing my character.


RE: Skin changing - Brassrhino - 07-01-2011

I Think that Character should be NPC.

[lua]function D(PP)
PP.NPC.Skin = "http://buildism.net/items/Blotto/2189"
end

link(game.Players.ChildAdded, D)[/lua]


RE: Skin changing - Duck - 07-01-2011

(07-01-2011, 12:08 AM)Brassrhino Wrote: I Think that Character should be NPC.

[lua]function D(PP)
PP.NPC.Skin = "http://buildism.net/items/Blotto/2189"
end

link(game.Players.ChildAdded, D)[/lua]

Definitely not.

The value actually changed in my character but my skin stayed as captain mcawesome