Page 1 of 1

3D model dynamic skin update issue...

PostPosted: Fri Dec 14, 2012 09:32
by redcrab
I would like to update 3D model skin on the fly with other event than "joining".. but it fails...


Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
-- this works (do refresh the visual aspect observed by other players)
minetest.register_on_joinplayer(function(player)
player:set_properties({    textures = {"askin.png"},})
end)

-- but
player:set_properties({    textures = {"askin.png"},})
-- elsewhere than register_on_joinplayer wont do the visual update to other players


... what's wrong ?

PostPosted: Fri Dec 14, 2012 11:49
by PilzAdam
Can you give examples for "elsewhere"?

PostPosted: Fri Dec 21, 2012 12:11
by redcrab
PilzAdam wrote:Can you give examples for "elsewhere"?


Like "on global step" for instance

PostPosted: Fri Dec 21, 2012 16:26
by rubenwardy
redcrab wrote:
PilzAdam wrote:Can you give examples for "elsewhere"?


Like "on global step" for instance


Is player specified in the function?

PostPosted: Fri Dec 21, 2012 17:54
by Zeg9
In my skins mod, it does that, check its source code...
Try {visual = "mesh",textures=...}, maybe this will work... maybe

PostPosted: Sun Dec 23, 2012 00:05
by PilzAdam
Make sure you get a not nil value for player.