Здравствуйте, у меня такая трудности с заменой я не могу придумать скрипт который заменял бы
Код:
|
{
"classname" "worldspawn"
"classname" "worldspawn"
"MaxRange" "4096"
"mapversion" "220"
"mapversion" "220"
"wad" "halflife.wad"
{
( 0 128 128 ) ( 128 128 128 ) ( 128 0 128 ) SKY [ 1 0 0 -64 ] [ 0 -1 0 64 ] 0 1 1
( 0 0 0 ) ( 128 0 0 ) ( 128 128 0 ) SKY [ 1 0 0 -64 ] [ 0 -1 0 64 ] 0 1 1
( 0 128 128 ) ( 0 0 128 ) ( 0 0 0 ) C1A3WALL01 [ 0 1 0 -64 ] [ 0 0 -1 0 ] 0 1 1
( 128 128 0 ) ( 128 0 0 ) ( 128 0 128 ) C1A3WALL01 [ 0 1 0 -64 ] [ 0 0 -1 0 ] 0 1 1
( 128 128 128 ) ( 0 128 128 ) ( 0 128 0 ) C1A3WALL01 [ 1 0 0 -64 ] [ 0 0 -1 0 ] 0 1 1
( 128 0 0 ) ( 0 0 0 ) ( 0 0 128 ) C1A3WALL01 [ 1 0 0 -64 ] [ 0 0 -1 0 ] 0 1 1
}
} |
на
Код:
|
k = "{\n( "+x+0+" "+y+128" 128 ) ( "+x+128+" "+y+128+" 128 ) ( "+x+128+" "+y+0+" 128 ) SKY [ 1 0 0 -64 ] [ 0 -1 0 64 ] 0 1 1 \n( "+x+0+" "+y+0+" 0 ) ( "+x+128+" "+y+0+" 0 ) ( "+x+128+" "+y+128+" 0 ) SKY [ 1 0 0 -64 ] [ 0 -1 0 64 ] 0 1 1 \n( "+x+0+" "+y+128+" 128 ) ( "+x+0+" "+y+0+" 128 ) ( "+x+0+" "+y+0+" 0 ) C1A3WALL01 [ 0 1 0 -64 ] [ 0 0 -1 0 ] 0 1 1 \n( "+x+128+" "+y+128+" 0 ) ( "+x+128+" " +y+0+ " 0 ) ( "+x+128+" "+y+0+" 128 ) C1A3WALL01 [ 0 1 0 -64 ] [ 0 0 -1 0 ] 0 1 1 \n( "+x+128+" "+y+128+" 128 ) ( "+x+0+" "+y+128+" 128 ) ( "+x+0+" "+y+128+" 0 ) C1A3WALL01 [ 1 0 0 -64 ] [ 0 0 -1 0 ] 0 1 1 \n( "+x+128+" "+y+0+" 0 ) ( "+x+0+" "+y+0+" 0 ) ( "+x+0+" "+y+0+" 128 ) C1A3WALL01 [ 1 0 0 -64 ] [ 0 0 -1 0 ] 0 1 1 \n}"; |
т.е. в исходном коде выбирал только объект и заменял Х У координаты.