Posted by Andy L on July 13, 1998 at 22:54:40:
In Reply to: Re: My COG posted by Heinz Högel on July 13, 1998 at 20:05:19:
: :
: : 0 IS a flag....
: : : This is my first attempt at a COG, someone tell me why it does not work!
: : Try this:
: :
: : ===========================================
: : #Jedi Knight COG Script
: : #
: : #COG which when a player tries to open a door plays
: : #a locked sound
: : #and displays a message saying "Looks like someone
: : #dos'nt want company..."
: : #
: : #Made by Mailer Copyright Mailercorp 98 all rights #reserved
: : #
: : #==========================================: : symbols
: : message activated
: : thing door1 nolink,desc=door1
: : sound locked=i00ky73t.wav local
: : end
: : #==========================================
: : code
: : activated:
: : PlaySoundLocal(locked,5,0x44);
: : Print("Looks like someone dosn't want company..."): : Return;
: : end
: :
: So far, so good...
: But this COG will still do nothing because of the "nolink" attribute for the door thing. Only linked objects can send their event messages to the linked cog script (that's why it's called a link). Simply replace "nolink" by "linkid=1".
: Heinz
You also forgot the ';' at the end of the Print() line.
-Andy