Posted by Jeff W. on June 23, 1998 at 09:24:32:
In Reply to: Re: Some answers, + JeffW, can you help? posted by BrianL on June 23, 1998 at 05:05:04:
4) Yup - I wrote a cog that is kinda long the lines as what you want a few months ago for my very stalled level. You press a button and it sends a message to everyone like - "Public Announcement - # Jedi Knight Cog Script symbols message activate int inuse=0 local surface switch linkid=1 sound switchwav flex delay=5.0 desc=delay end # ======================================================================================== code activate: Sleep(delay);
#
# PA.COG
#
# Prints a specified text message on the screen from cogstrings.uni
#
# [JW]
#
# Copyright (c) Jeff Walters 1998
int player local
flex unistring desc=unistring
flex unistring2 desc=unistring2
# ........................................................................................
if(inuse == 1) Return; //Check if PA is in use, if so exits
inuse = 1;
PlaySoundPos(switchwav, SurfaceCenter(switch), 1, -1, -1, 0); //switch sound
player = GetSourceRef();
jkStringClear();
jkStringConcatUNIString(unistring); //Prints specified text message from cogstrings.uni
jkStringConcatSpace();
jkStringConcatPlayerName(player); //player name
jkStringConcatSpace();
jkStringConcatUNIString(unistring2); //Prints specified text message from cogstrings.uni
jkStringOutput(-3, -1);
inuse = 0;
return;
end