home *** CD-ROM | disk | FTP | other *** search
- # Droids COG Script
- #
- # 00_HelptextTimer.cog
- #
- # Displays Help messages with optional timeouts
- #
- # Desc (original):
- # Two sectors, startsector and startsecotr2 will trigger the message number
- # specified by messagenumber. The stopsectors display message 0, effectively
- # turning it off.
- #
- # Desc (Timer version):
- # There are now two new variables, displaytime and show_once.
- # Displaytime, if set to a number larger than 0, will only
- # display the message for the number of seconds it's set to.
- # Show_once, if set to 1, will display the message only once then never
- # display it again.
- #
- # [MT] Created
- # 11/03/97 [DGS] Added Printtext commands for debugging
- # 11/04/97 [DGS] Added two more start and stop sectors
- # 12/03/97 [DGS] Modified "Helptext" to add timeouts and one-offs (see desc. above).
- # 03/10/98 [JP] Modified to add 2nd message.
- # 04/28/98 [JP] This is it, with the voice files and such
- # ========================================================================================
-
- symbols
- message entered
- message timer
- message startup
- message pulse
-
-
- sector inventory linkid=1
-
- int show_once=1 local
- int show_once2=1 local
-
-
- end
-
- code
-
- startup:
- player=getlocalplayerthing();
- sleep(10);
- setpulse(15);
-
- return;
-
-
- pulse:
- if (dwCheckDroidCaps(256))
- {
- if (show_once < 2)
- {
- dwplaycammyspeech(16161, "TGCA036.wav", 5, 1);
- if (show_once == 1) show_once = 2;
- setpulse(0);
- }
- }
-
- else if (dwcheckDroidCaps(32))
- {
- if (show_once < 2)
- {
- dwplaycammyspeech(16161, "TGCA036.wav", 5, 1);
- if (show_once == 1) show_once = 2;
- setpulse(0);
- }
- }
-
- else if (dwCheckDroidCaps(262144))
- {
- if (show_once < 2)
- {
- dwplaycammyspeech(16161, "TGCA036.wav", 5, 1);
- if (show_once == 1) show_once = 2;
- setpulse(0);
- }
- }
-
- else
- {
- if (show_once < 2)
- {
- dwplaycammyspeech(16160, "TGCA035.wav", 5, 1);
- if (show_once == 1) show_once =2;
- setpulse(0);
- }
- }
-
- return;
-
-
-
- end
-