ok..I need some help...I'm trying to create a cog that when you try to activate it normally, it simply gives you a broken sound. But when you damage the door with explosive damge or force destruction blast damage only the door makes a creaking sound and then the door falls over. Now I've made a cog so far..but right now it isn't working...so I need your help with it...thanks in advance!
symbols
message activated
message damaged
thing door linkid=1
int damageType local
int speed=
sound creaksound=
sound brokensound=
end
## Code Section
code
activated:
if (IsThingMoving(door)) return;
if (GetCurFrame(door) != 0) return;
if (GetSenderId() != 1) return;
PlaySoundThing(brokensound, door, 1, -1, -1, 0);
return;
damaged:
if (GetCurFrame(door) == 1) return;
damageType = GetParam(1);
if(damageType & 4) // FIRE
MoveToFrame(door, 1, speed);
PlaySoundThing(creaksound, door, 1, -1, -1, 0);
else
if(damageType & 8) // FORCE
MoveToFrame(door, 1, speed);
PlaySoundThing(creaksound, door, 1, -1, -1, 0);
return;
end
[This message has been edited by Jedi_Merlin (edited October 10, 2001).]
symbols
message activated
message damaged
thing door linkid=1
int damageType local
int speed=
sound creaksound=
sound brokensound=
end
## Code Section
code
activated:
if (IsThingMoving(door)) return;
if (GetCurFrame(door) != 0) return;
if (GetSenderId() != 1) return;
PlaySoundThing(brokensound, door, 1, -1, -1, 0);
return;
damaged:
if (GetCurFrame(door) == 1) return;
damageType = GetParam(1);
if(damageType & 4) // FIRE
MoveToFrame(door, 1, speed);
PlaySoundThing(creaksound, door, 1, -1, -1, 0);
else
if(damageType & 8) // FORCE
MoveToFrame(door, 1, speed);
PlaySoundThing(creaksound, door, 1, -1, -1, 0);
return;
end
[This message has been edited by Jedi_Merlin (edited October 10, 2001).]