Ambrosia Garden Archive
    • ===[Timer Dev Source v1.0]===


      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.

      Purpose:
      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.

      Enjoy...
      ~stray

      ------------------
      Shift Pattern Graphics at (url="http://"http://shiftprint.com")http://shiftprint.com(/url)
      See CGE_Tips at:
      (url="http://"http://coldroom.150m.com/CGE_Stuff/CGE_Tips.html")CGE_Tips(/url)

      (This message has been edited by straytoaster (edited 08-31-2002).)

    • That is one awesome piece of work man, and I'm sure as hell going to be using it.
      If I'm ever in your neighbourhood, drinks are on me 🙂

      ------------------

    • Quote

      Originally posted by -LethaLGraphiX-:
      That is one awesome piece of work man, and I'm sure as hell going to be using it.

      You can say that again.

      Stray "loaned" me the code to his timer last week so that I could do some real world testing by integrating it into a PoG plug-in I'm working with. And I must say, it integrated very nicely and easily, and I am currently running 7 spell duration effects off the same timer. It runs very, very smoothly.

      (btw, for some that might ask, "Why are you using the timer when spells already have duration timers?" Well, there is a bug in that if you use the "Remove Effects" event and have more than 1 spell resident, CGE biffs the removal of the spells so that the first spell cast will never run its "Remove Effects" event, thereby making whatever was in that event permaneant. Using Stray's toaster by-passes this and fixes that bug).

      ------------------
      What's The Difference Between Roast Beef And Pea Soup?
      Anyone Can Roast Beef.
      ------------------
      (url="http://"http://www.avalon.net/~honda/pog/pogwalkthrough2a.htm")PoG Walkthrough and Compendium(/url) | (url="http://"http://www.ambrosiasw.com/cgi-bin/vftp/dl-redirect.pl/PoG_Dev_Tools_Source.sit?path=coldstone/resources&file;=PoG_Dev_Tools_Source.sit")PoG Dev Tools(/url)

    • Quote

      Originally posted by Stark Bledfast:
      **You can say that again.

      Stray "loaned" me the code to his timer last week so that I could do some real world testing by integrating it into a PoG plug-in I'm working with. And I must say, it integrated very nicely and easily, and I am currently running 7 spell duration effects off the same timer. It runs very, very smoothly.

      (btw, for some that might ask, "Why are you using the timer when spells already have duration timers?" Well, there is a bug in that if you use the "Remove Effects" event and have more than 1 spell resident, CGE biffs the removal of the spells so that the first spell cast will never run its "Remove Effects" event, thereby making whatever was in that event permaneant. Using Stray's toaster by-passes this and fixes that bug).

      **

      Guy, you are seriously sick. Very nice job kudos, i'm surprised your revealing all these nice workarounds for the public
      ::ganks files from site::

      ------------------
      (url="http://"http://www.geocities.com/ellrx/index.html")The trinity complete: Coldstone, TNT Basic, Klik&Play;(/url)

    • It's out now. Very nicely done stray. Another point in the copybook for you. 🙂

      -Andiyar

      ------------------
      "Any good that I may do here, let me do now, for I may not pass this way again"

    • just thought i'd put up the link the timer's on this page
      (url="http://"http://www.AmbrosiaSW.com/games/coldstone/addons.html")http://www.AmbrosiaS...one/addons.html(/url)

      or direct d/l here
      (url="http://"http://www.ambrosiasw.com/cgi-bin/vftp/dl-redirect.pl/timer_dev_tools.sit?path=coldstone/resources&file;=timer_dev_tools.sit")http://www.ambrosias...r_dev_tools.sit(/url)

      ~stray

      ------------------
      Shift Pattern Graphics at (url="http://"http://shiftprint.com")http://shiftprint.com(/url)
      See CGE_Tips at:
      (url="http://"http://coldroom.150m.com/CGE_Stuff/CGE_Tips.html")CGE_Tips(/url)

    • I have a suggestion for improving the timer plugin.

      I ran into a problem in the dungeon where I couldn't get across a bridge, the timer npc was blocking access. I thoughts about teleporting him around, but that doesn't seem possible, so I though of an alternative... one that could never affect the player.

      Use a stamp. In the addtimer event, instead of placing the timer npc, I add a stamp at 0,0 and use the same animation the timer npc uses. Works like a champ and the player will never know it's there.

      ------------------

    • Quote

      Originally posted by Bacomatic:
      **
      I have a suggestion for improving the timer plugin.

      I ran into a problem in the dungeon where I couldn't get across a bridge, the timer npc was blocking access. I thoughts about teleporting him around, but that doesn't seem possible, so I though of an alternative... one that could never affect the player.

      Use a stamp. In the addtimer event, instead of placing the timer npc, I add a stamp at 0,0 and use the same animation the timer npc uses. Works like a champ and the player will never know it's there.

      **

      thanks for the suggestion i thought about placing the npc at 0,0 or -1,-1 or make it flee the player but i never thought of your sanerio but you can alway save your game and reload to get around the timer since the timer npc is random it will be in a different spot when you load the screen

      ~stray

      ------------------
      Shift Pattern Graphics at (url="http://"http://shiftprint.com")http://shiftprint.com(/url)
      See Coldstone_Tips at: (url="http://"http://coldroom.150m.com/CGE_Stuff/CGE_Tips.html")CGE_Tips(/url)

    • Quote

      Originally posted by Bacomatic:
      I ran into a problem in the dungeon where I couldn't get across a bridge, the timer npc was blocking access. I thoughts about teleporting him around, but that doesn't seem possible, so I though of an alternative... one that could never affect the player.

      Mr. Bacomatic,

      Out of morbid curiousity, which dungeon/map did you run into this problem? I'm not doubting you, but I'd like to verify this so that I can ensure smooth, bugless play for my plug-ins that utilize the timer.

      Thanks

      ------------------
      What's The Difference Between Roast Beef And Pea Soup?
      Anyone Can Roast Beef.
      ------------------
      (url="http://"http://stark.evula.net/pogwalkthrough.htm")PoG Walkthrough and Compendium(/url) | (url="http://"http://www.ambrosiasw.com/cgi-bin/vftp/dl-redirect.pl/PoG_Dev_Tools_Source.sit?path=coldstone/resources&file;=PoG_Dev_Tools_Source.sit")PoG Dev Tools(/url)

    • Quote

      Originally posted by Stark Bledfast:
      **Out of morbid curiousity, which dungeon/map did you run into this problem? I'm not doubting you, but I'd like to verify this so that I can ensure smooth, bugless play for my plug-ins that utilize the timer.
      **

      It was in the crystal order dungeon, the one with all the lava and rope bridges, where you get the black dragon tooth.

      ------------------