Posted by JM on July 13, 1998 at 10:14:22:
In Reply to: Hidden "Walls" - Solution posted by Antony Espindola on July 13, 1998 at 04:51:36:
Heh.... simple enough. Wanna know how to make it flicker? ;)
: : message damaged : surface button mask=0x408 : end : ## Code Section : code : damaged: //the come back on flicker : SetWallCel(button,0); : end
: # Jedi Knight Cog Script
: #
: # ANT_HIDDEN_WALL.COG
: #
: # This Cog makes an whole surface (hidden wall) disappear
: # when a surface (button) is shot or activated.
: #
: # by Antony Espindola
: # http://www.Horrible.Demon.co.uk/
: #
: # Please give credit if you use this COG!
: #
: symbols
: message activated
: surface frontface mask=0x448
: surface backface mask=0x448
: sound dosound=beep1.wav
: float SleepTime=2.0
: int active=0 local
: activated:
: if (active == 0)
: {
: active=1;
: SetWallCel(button,1);
: PlaySoundLocal(dosound, 1, 0, 0);
:
: // unadjoin and untexture surfaces
: setadjoinflags(frontface,2);
: setadjoinflags(backface,2);
: setfacegeomode(frontface,0);
: setfacegeomode(backface,0);
//code I added to make it flicker
sleep(1);
Setfacegeomode(backface, 4);
SetFaceGeoMode(frontface, 4);
sleep(2);
SetFaceGeoMode(backface, 0);
SetFaceGeoMode(frontface, 0);
sleep(2);
SetFaceGeoMode(backface, 4);
SetFaceGeoMode(frontface, 4);
Sleep(1);
SetFaceGeomode(backface, 0);
SetFaceGeoMode(frontface, 0);
:
Sleep(SleepTime);
sleep(1);
Setfacegeomode(backface, 4);
SetFaceGeoMode(frontface, 4);
sleep(2);
SetFaceGeoMode(backface, 0);
SetFaceGeoMode(frontface, 0);
sleep(2);
SetFaceGeoMode(backface, 4);
SetFaceGeoMode(frontface, 4);
Sleep(1);
SetFaceGeomode(backface, 0);
SetFaceGeoMode(frontface, 0);
:
// readjoin and texture surfaces
: clearadjoinflags(frontface,2);
: clearadjoinflags(backface,2);
: setfacegeomode(frontface,4);
: setfacegeomode(backface,4);
: PlaySoundLocal(dosound, 1, 0, 0);
: active=0;
: }
: return;
:
: Please give credit if you use it!