Character Left/Right Script
#1
If you make a left, right, and center version of a skin, you can use this script to make all players of your game use it. The direction they are facing will change appropriately as they move.

[lua]left ="http://buildism.net/asset/file/152.png"
center = "http://buildism.net/game/defaultskin.png"
right = "http://buildism.net/asset/file/153.png"
character = nil


function propertyChanged(name, value)
if name == "Velocity" then
if value.x == 0 then
character.Skin = center
elseif value.x < 0 then
character.Skin = left
elseif value.x > 0 then
character.Skin = right
end
end
end

function childAdded(newcharacter)
if newcharacter:isA("Character") and game.Players:getChild(newcharacter.Name) ~= nil then
character = newcharacter
character.Skin = center
local c = character.Body:getChild("Controller")
if c ~= nil and c:isA("VelocityController") then
link(c.PropertyChanged, propertyChanged)
end
end
end

link(game.World.ChildAdded, childAdded)[/lua]

I'm thinking about officially adding this to the game. I would put space in the skin file for 2 extra heads, so you can do the effect with just one file, and it will work at any game. Opinions?
Reply
#2
Yes, please add it. And add when a player is idle, the face just turns forward.
[Image: 76561198037039305.png]
[Image: nmdd7o.gif]
Reply
#3
Add it This is your Top Priority :3
[Image: DE6C70C2EA282475FBD8321DC4456290.png]
Reply
#4
I know I'm not the only one who's thought about adding this -- yes PLEASE add it into the game.

HOWEVER...
What about all our old skins? If you make the change, please make sure that our old skins don't go completely out of date -- either that, or make it so that we can 're-upload' and change the description of skins.

By the way, there is a PropertyChanged event here? Awsome. Anyway, it's been a few days since this thread 'died' -- please put this in when you add stable welds at the lastest!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)