| Blockland Forums > Modification Help |
| IFL textures |
| (1/2) > >> |
| Packer:
Has any one successfully created IFL animations in Blockland except Badspot? I'm looking into using IFL's in a small idea project for Blockland I want to know if anyone has actually gotten them working and cares to share. I'd Appreciate it, thanks. |
| Treynolds416:
For stupid people like me, could you explain exactly what those are? |
| Packer:
--- Quote from: Treynolds416 on February 26, 2011, 09:41:11 AM ---For stupid people like me, could you explain exactly what those are? --- End quote --- If you don't know you're not helping. IFL, like GIF's but in Torque. Thats the most basic understandable way of explaining it. |
| Iban:
Huh, so that's what an IFL is. This explains a lot. CityRPG's GUI has IFLs in it but I never really quite understood what they were. In the Stats GUI, there is an animated object like the one in the Options GUI where you play dress-up. In order to set the face or chest decal, you need to use this: --- Code: ---CRPG_Avatar.setIflFrame(CRPG_Avatar.dynamicObject, "face", getIflFrame("face", $Pref::Avatar::FaceName)); CRPG_Avatar.setIflFrame(CRPG_Avatar.dynamicObject, "decal", getIflFrame("decal", CRPG_Avatar.decal)); --- End code --- (CRPG_Avatar is the GuiObjectView. CRPG_Avatar.dynamicObject is the embedded dynamic object.) This diddy gets the line of the IFL file specified where %name appears. --- Code: ---function getIflFrame(%node, %name) { %file = "base/data/shapes/player/" @ %node @ ".ifl"; if(isFile(%file)) { %name = stripTrailingSpaces(fileBase(%name)); if(%name !$= "") { %fo = new FileObject() {}; %fo.openForRead(%file); %hasFound = false; %lineNum = 0; while(!%fo.isEOF()) { %line = %fo.readLine(); %thisDecal = stripTrailingSpaces(fileBase(%line)); if(%thisDecal $= %name) { %hasFound = true; break; } else { %lineNum++; } } %fo.close(); %fo.delete(); if(%hasFound) { return %lineNum; } else { return 0; } } else { return 0; } } else { echo("\c2getIflFrame(\"" @ %node @ "\", \"" @ %name @ "\") : You did not supply a proper IFL file name to read from."); return 0; } } --- End code --- The IFL file is a composite of file paths to all default and add-on decals. --- Code: ---base/data/shapes/player/decals/AAA-None.png Add-Ons/Decal_Zombies/ZAPT-Witch.png Add-Ons/Decal_Zombies/ZAPT-Suit.png Add-Ons/Decal_Zombies/ZAPT-StoClerk.png Add-Ons/Decal_Zombies/ZAPT-MallCop.png Add-Ons/Decal_Zombies/ZAPT-Bowling.png Add-Ons/Decal_Zombies/ZAPT-BillyMays.png Add-Ons/Decal_Zombies/ZAPT-Basketball.png Add-Ons/Decal_WORM/worm_engineer.png Add-Ons/Decal_WORM/worm-sweater.png --- End code --- So if I --- Code: ---echo(getIflFrame("decal", "Add-Ons/Decal_Zombies/ZAPT-Witch.png")); --- End code --- It prints this --- Code: ---1 --- End code --- What this says to me is that IFL files are not actual animations but a collection of single frames. This means the player's face and decal is actually a single frame in a still animation. Beyond that, beats me. I can't model so I don't know anything about the process. Perhaps try referencing an IFL file instead of a PNG file for a texture, and then set the IFL file up properly. That may work. |
| Treynolds416:
--- Quote from: Packer on February 26, 2011, 10:40:01 AM ---If you don't know you're not helping. IFL, like GIF's but in Torque. Thats the most basic understandable way of explaining it. --- End quote --- I am quite aware that I wasn't helping. But that makes sense. Look at how Badspot made the "Ghosting" IFL. He ran a bunch of static images one after another. Torque doesn't really like fast moving image uploads however, so keep the animation somewhat primitive, to avoid headache. Again, I may or may not be helping. If I am not, don't say anything. |
| Navigation |
| Message Index |
| Next page |