Posted by Pugi on October 19, 1998 at 21:40:27:
In Reply to: Re: Hey do you think this is going to work posted by Pugi on October 19, 1998 at 11:06:32:
Thanks to fourwood and EvanC for their valuable help
in figuring this one out. I added the startup message(duh!)
and changed the cog symbols to things as well as the links.
However, after looking at other cogs from JK1.GOB, I guessed
that no darkjedi thing can send/receive messages without
the appropriate mask. See below. It now works.
symbols
message startup
message killed
thing player local
sound goalsnd=Accomplish1.wav local
thing jedi_1 mask=0xfff linkid=1
thing jedi_2 mask=0xfff linkid=1
thing jedi_3 mask=0xfff linkid=1
int deadguys=0 local
end
# ========================================================================================
code
startup:
player = GetLocalPlayerThing();
Return;
killed:
if (GetSenderId != 1) return;
deadguys=deadguys+1;
if (deadguys==3) {
jkPrintUNIString(player, 00350);
SetGoalFlags(player, 2, 2);
PlaySoundThing(goalsnd, player, 1.0, -1, -1, 0);
}
Return;
# ........................................................................................
end