for my game mosaic, i m having a civilian model with a protest sign. On this protest sign are letters- which allow for a dynamic composition of messages. With funny anti-player rhetorics.
Thats the theory...
However- i can not move, turn or spin those letter pieces in any direction. I can however- turn the parentpiece (the protestsign).
I can show them, but i can not move them - although calls to moving functions are executed and - the software claims that the position has changed.
Code: Select all
function makeProtestSign(signSizeX, signSizeZ, sizeLetter, sentence)
index = 0
xIndexMax= signSizeX/sizeLetter
zIndexMax= signSizeZ/sizeLetter
alreadyUsedLetter ={}
for i=1, #sentence do
letter = string.upper(string.sub(sentence, i, i))
if letter == "!" then letter = "Exclam" end
if letter == "?" then letter = "Quest" end
if letter == "\n" then zIndex= math.floor(index /zIndexMax); zIndex = zIndex +1; index = zIndex*xIndexMax; break; end
local pieceToMove
if TablesOfPiecesGroups[letter] then
if not alreadyUsedLetter[letter] then
alreadyUsedLetter[letter]= 1;
pieceToMove = TablesOfPiecesGroups[letter][alreadyUsedLetter[letter]]
else
alreadyUsedLetter[letter]= alreadyUsedLetter[letter] + 1;
if TablesOfPiecesGroups[letter][alreadyUsedLetter[letter]] then
pieceToMove = TablesOfPiecesGroups[letter][alreadyUsedLetter[letter]]
end
end
end
if letter == " " then
index= index+1
elseif pieceToMove ~= nil then
--place and show letter
Show(pieceToMove)
xIndex= index % xIndexMax
zIndex= math.floor(index /zIndexMax)
Move(pieceToMove,z_axis, zIndex* sizeLetter,0)
Move(pieceToMove,x_axis, xIndex* sizeLetter,0)
index= index+1
end
end
end
https://github.com/PicassoCT/MOSAIC/blo ... vilian.DAE
Anyone any advice?