Page 1 of 1
GetTileID(set, name) ... how does this work?
Posted: Mon Oct 04, 2010 8:08 pm
by Merr
Pip,
I'm trying to use this to work ... GetTileID(set, name) ... but to no avail.
Please throw an example out (in code form) to show me the right values, names, set, etc.
Thank you ... and yes, the gas and oil is in the right tank but I need to know which octane and grade of oil please

Posted: Mon Oct 04, 2010 9:30 pm
by pipfromslitherine
It's somewhat complex. The set is basically the folder name of the tile set, and the name is the tile name as per the TILES.TXT file. As an example, the following code gets the IDs of the water tiles for each of the 3 tile sets and stores them in some globals.
SetGlobal("water1", GetTileID("MoreTiles", "Tile25")) ;
SetGlobal("water2", GetTileID("deserttiles", "Tile33")) ;
SetGlobal("water3", GetTileID("bulge_tiles", "Tile26")) ;
Note that the IDs are transient, as they can move around based on other tilesets being loaded, etc.
1.4 contains an edging plugin which will illustrate the use of this stuff. It's pretty fiddly though.
Cheers
Pip
Posted: Mon Oct 04, 2010 11:08 pm
by Merr
Ahhh, I see .... The problem was I didn't set them as a global. It never dawned on me to use globals.
Cool ... now back to the drawing board ... I'll explain what I'm doing if I get it to work properly.
Thanks again for answering the door!