The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
timerf instead of i_memory
Author Message
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #5
RE: timerf instead of i_memory
(09-10-2015 11:27 PM)Art Wrote:  You mean item timer stops, but timerf continues working? I just not sure how works 'stack' for those timerf functions. For items it's more controllable. You can see item, etc., but timerf function hovering somewhere in memory and can't see it or 'touch', and don't know how much of those timerf functions can work at same time Smile

When you make a save, timerf are saved in spheredata.scp in this way: (it's a sort of list structure)

Code:
[TIMERF]
CurTick=3  //always on the top of the list
TimerFCall=name ciao // function name and it's argument, called by see below
TimerFNumbers=1,1073749939,492 // I think it's a tick number, uid in decimal of the object, time left in seconds
TimerFCall=name hi
TimerFNumbers=2,1,499
TimerFCall=name hola
TimerFNumbers=3,1073750000,497
TimerFCall=name borp
TimerFNumbers=7,1073750005,495





Also notes that if you do like

Code:
timerf 10,str 100
timerf 20,str 100
timerf STOP,str 100
both timerf will be stopped.

instead

Code:
timerf 10,str 100
timerf 20,str 200
timerf STOP,str 200

Will stop only timerf 20,str 200

My opinion is that timerf are best used for "permanent" time based scripts (like a weather system?) and for short-term function that lasts for some minutes.

For NPCs, timerf doesn't stop when the sector the npc is in goes to sleep mode, so having a lot of NPCs with a lot of timerf function that runs constantly could be worst than a memory item installed in each npc.
(This post was last modified: 09-11-2015 12:41 AM by darksun84.)
09-11-2015 12:35 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
timerf instead of i_memory - Art - 09-10-2015, 03:33 PM
RE: timerf instead of i_memory - darksun84 - 09-10-2015, 08:12 PM
RE: timerf instead of i_memory - Art - 09-10-2015, 11:27 PM
RE: timerf instead of i_memory - darksun84 - 09-11-2015 12:35 AM
RE: timerf instead of i_memory - azmanomer - 09-10-2015, 11:53 PM
RE: timerf instead of i_memory - pointhz - 09-11-2015, 12:42 AM
RE: timerf instead of i_memory - darksun84 - 09-11-2015, 12:57 AM
RE: timerf instead of i_memory - pointhz - 09-11-2015, 01:40 AM
RE: timerf instead of i_memory - darksun84 - 09-11-2015, 01:50 AM
RE: timerf instead of i_memory - Art - 09-11-2015, 02:32 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)