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
Trying to move NPCs at night to "go home", I blame sectorsleep.
Author Message
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #6
RE: Trying to move NPCs at night to "go home", I blame sectorsleep.
Why would the NPC teleport home when there is no player if the entire function is under @NPCLookatChar?

How do you expect it to fire to send an NPC home with no player present? Your script will only run if that trigger is... triggered.
What you should do is have it look at the time of day in the gameworld, or a lightlevel to do the teleport home function. Of course then you will have to script it so that before it teleports it looks to see if it can indeed be seen by a player.

Further more is the trigger not @NPCSeeNewPlayer on @SeeNewPlayer? It's been a while since I did any serious scripting with sphere so I don't know whether your trigger is one they added or one I forget, but I don't recall seeing it before.

[Image: 2nis46r.jpg]
(This post was last modified: 08-11-2012 03:01 AM by Mordaunt.)
08-11-2012 02:43 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Trying to move NPCs at night to "go home", I blame sectorsleep. - Mordaunt - 08-11-2012 02:43 AM

Forum Jump:


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