ok -- my bad -- you didnt store the result of GetEntityBrush(map) into its own variable.
This is how I load terrain with lightmap that I create with ALE: (dont expect it to be much different for any lightmapped mesh)
;Load Level
level = LoadMesh("default/default.b3d")
ScaleEntity level, 2, 2, 2
PositionEntity level, 0,-5,0
;Lightmap
EntityFX level, 1
Global lightmap = LoadTexture("default/default_lm.png")
TextureCoords lightmap, 1
TextureBlend lightmap, 2
EntityTexture level, lightmap, 0, 1
Note the EntityTexture command.. the lightmap is loaded into texture slot 1 (of 0-7 possible). One may presume that the mesh textures are in slot 0 -- if you replace slot 0, you get lightmap all over your models :)
This is how I load terrain with lightmap that I create with ALE: (dont expect it to be much different for any lightmapped mesh)
;Load Level
level = LoadMesh("default/default.b3d")
ScaleEntity level, 2, 2, 2
PositionEntity level, 0,-5,0
;Lightmap
EntityFX level, 1
Global lightmap = LoadTexture("default/default_lm.png")
TextureCoords lightmap, 1
TextureBlend lightmap, 2
EntityTexture level, lightmap, 0, 1
Note the EntityTexture command.. the lightmap is loaded into texture slot 1 (of 0-7 possible). One may presume that the mesh textures are in slot 0 -- if you replace slot 0, you get lightmap all over your models :)