Aller au contenu

Photo

Build-In hook for night-time activity script...


  • Veuillez vous connecter pour répondre
5 réponses à ce sujet

#1
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
I was looking through th ginc for WalkWayPoint() and found that there is a hook to run a script stored on the module. The script will fire for NPCs running the WalkWayPoint() function if it is nighttime, or so it would appear.  I haven't tested it.

Store the script as a local string on the module by the name:

X2_S_SLEEP_AT_NIGHT_SCRIPT

As best I can tell, it will fire at night for the NPC.

Modifié par M. Rieder, 05 juin 2011 - 12:00 .


#2
kamal_

kamal_
  • Members
  • 5 260 messages
what does it do?

#3
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
In the code there is a check to see if it is nighttime and if it is it causes the NPC calling the WalkWayPoint() function to execute a script saved as a local string on the module. The name of the string is "X2_S_SLEEP_AT_NIGHT_SCRIPT".

Its just a hook to let you put in your own custom script, the same way you could put it in the area heartbeat.

#4
_Knightmare_

_Knightmare_
  • Members
  • 643 messages
This relates to the other walkpoints discussion, I believe by setting the values you can have the script be another "wp_walkpoint" script. So, they would follow one set of walkpoints during the daytime and another separate set at night. Or so I think...

#5
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
That's what the code would seem to suggest.

#6
Shallina

Shallina
  • Members
  • 1 012 messages
Tried to get that work on NWN2, a day and a night path for "automatics" waypoint.

it seems that in NWN2 it's set in stone in the area, wich mean if you use that the NPC will only do the "day path", and you won't be able to stop it, or assign him to something else even at night.

In the end I did my own system.