Blockland Forums > Modification Help
Problem with 'face/decal' force-download
(1/3) > >>
Bauklotz:

--- Code: ---function downloadDecalPath(%path)
{
for(%file=findFirstFile("Add-Ons/" @ %path @ "/*.png");%file!$="";%file=findNextFile("Add-Ons/" @ %path @ "/*.png"))
{
%obj = datablock DecalData()
{
textureName = %file;
preload = true;
};
%obj.setName("BB_DecalDownload_" @ strReplace(strReplace(strReplace(%file,".png",""),"Add-Ons/",""),"/","_"));
}
}

downloadDecalPath("Face_BlockBastion");
downloadDecalPath("Decal_BlockBastion");
--- End code ---

Decal_BlockBastion contains a "testFaec.png" face image file which is correctly sized and everything, but when I do the following, the client does not see the face:
clientGroup.getObject(1).setFaceName("testFaec");
Bauklotz:
Bump.
Bauklotz:
iBumpTwice.
Bauklotz:
iBumpThrice.
Red_Guy:

--- Quote from: Bauklotz on November 11, 2010, 02:48:40 AM ---
Decal_BlockBastion contains a "testFaec.png" face image file which is correctly sized and everything, but when I do the following, the client does not see the face:
clientGroup.getObject(1).setFaceName("testFaec");

--- End quote ---

How many people are on your server at the time?
ClientGroup.getObject(1) gets the SECOND client connected.   Make sure thats what you want.   if you want the first and only client, use ClientGroup.getObject(0)

might be better to use something like this instead for testing:
findclientbyname(somebody).setFacename("testFaec");
Navigation
Message Index
Next page

Go to full version