this is part of the ReadMe.txt for the timer I scripted. This is a six frame NPC_timer animation that will call the <addsec> event on frame two. I've left room for more event calls and other tricks to be called by this timer.
I upped it to the CGE add-ons and a few developers already have it so look for timed events coming soon to a plugin or game near you. I also upped the plugin to the PoG side of the site so you the feel the joy firsthand but this script could be used to add that 4th dimension to any game. If you have questions, comments, fan/hate mail try Straytoaster@macDOTcom.
This is my suggestion for a timer script. it roughly approximates real time 1:1 (1 second = 1 second etc.). It will currently work in all locations in PoG/Trinity. If you'd like to add the timer to a new location for your plugin. First add the location to the Plugin data(mod).txt file in the source folder. Save to the Plugin Folder in PoG. Then in Coldstone from the Project Menu choose Game Plugin> Load Plugin Data... choose the Plugin data(mod).txt in the Plugin Folder. Last add the timer via the Project Menu choose Game Plugin>Plugin load calls and add the <addtimer> event to each new location.
The timer handles ten varibles that are defined here:
gb_sec tracks seconds
gb_min tracks minutes
gb_hour tracks hours
gb_day tracks days
gb_timer tracks klicks/seconds
gb_timeron tracks the i/o toggle of the timer
gb_screentime tracks time in a location
gb_stopwatchtime tracks stopwatch time
gb_stopwatchon tracks the i/o toggle of the stopwatch
gb_stopwatchstate tracks the ON/OFF state of the stopwatch
The klick counter can but used to time spell and other duration type items by adding a stoptime global (gb_stoptime = gb_timer+100) then rechecking for gb_timer = gb_stoptime. For a hundred second spell.
The other varibles can but used to track a week long quest or just to remind the player how much time has past.
I've included a complete timer plugin. Try it in order to get a feel for PoG time.
Shift Pattern Graphics at (url="http://"http://shiftprint.com")http://shiftprint.com(/url)
See CGE_Tips at:
(This message has been edited by straytoaster (edited 08-31-2002).)