1. I coped a script from Layzgamer (from you tube). Here is the script:
Code: Select all
script 1 (int LineID)
{
Setlineblocking(LineID,OFF);
int var0;
thingsound(LineID+1, "glass", 127);
//GlassShards gets flying
var0 = 4; //Sets how many shards that will spawn
while(var0 > 0)
{
var0--;
SpawnProjectile (LineID+1, "NJGlassShard", random(0, 255), random(10, 80), random(20, 40), 36, 99);
}
SetActorProperty(99, APROP_Damage, 1); //Sets dealing damage for shards
//Texture cicle
setlinetexture (LineID, SIDE_FRONT, TEXTURE_MIDDLE, "njsmsh01");
setlinetexture (LineID, SIDE_BACK, TEXTURE_MIDDLE, "njsmsh01");
delay(4);
setlinetexture (LineID, SIDE_FRONT, TEXTURE_MIDDLE, "njsmsh02");
setlinetexture (LineID, SIDE_BACK, TEXTURE_MIDDLE, "njsmsh02");
delay(4);
setlinetexture (LineID, SIDE_FRONT, TEXTURE_MIDDLE, "njsmsh03");
setlinetexture (LineID, SIDE_BACK, TEXTURE_MIDDLE, "njsmsh03");
delay(4);
setlinetexture (LineID, SIDE_FRONT, TEXTURE_MIDDLE, "njsmsh04");
setlinetexture (LineID, SIDE_BACK, TEXTURE_MIDDLE, "njsmsh04");
delay(4);
setlinetexture (LineID, SIDE_FRONT, TEXTURE_MIDDLE, "-");
setlinetexture (LineID, SIDE_BACK, TEXTURE_MIDDLE, "-");
}
3. Set map spot Tag to 101 as in the picture below.
4. Set Script Execute to Script 1 and LineID 100, as in the screen below.
5. Placed textures and their deffinitions in my pk3 as in the picture below.
I can't figure out why the glass does not break.