I had a strange problem in my module..the time don't pass..only if i force hours i could! :/
I don't know how check and what script influence it!
I had a strange problem in my module..the time don't pass..only if i force hours i could! :/
I don't know how check and what script influence it!
no..it's 10 :/
In bigger modules time really doesnt pass. At least on the clocks, the real time is still correct and can be accessable from NWScript (GetTime GetDate)
the solution is to check for current time and if last stored hour changed then to set time by NWScript command.
Also, if you have this issue you will probably have issue also with slow closign doors and AOE spell heartbeat not functional...
Also do not advance the time in situations where the game can be paused (this mostly applies to single player modules), the time seems to only be effectively changed when the time is already passing.
I saw that night never coming and death corpse remain to ground forever.
there is a script that control generally the time passed?
The Ingame clock stopping or losing dawn to day and dusk to night transitions are the first signs of server wide lag. While it occurs on many PWs, if you're really picky, detailed, bah .. just outright anal in your building and scripting, your module could never suffer from it. For my own module, I had to do alot of things in conjunction to get the clock to be reliable. Palletes are trimmed, scripts optomized, area sizes decreased in many instances, building details like setting most objects to plot and static along with limiting placeables that interfere with pathfinding in hostile areas and tons more. By being almost obsessive in how I build nowadays, my module clock rarely if ever falters now (960 areas currently). Before I became obsessed with efficiency, my module clock would stop (only 250 or so areas then) quite often.
I do have a clock forcing script if needed though. I used it in my module's OnHeartBeat event until around a year and a half ago.
void main()
{
int iHour = GetTimeHour ();
int iMinute = GetTimeMinute ();
int iSecond = GetTimeSecond ();
int iMillisecond = GetTimeMillisecond();
SetTime(iHour, iMinute, iSecond, iMillisecond);
}
Seems now time pass again! thanks for help.
But dead corpse and loot of enemy stay there forever..maybe i must change something else?
Seems now time pass again! thanks for help.
But dead corpse and loot of enemy stay there forever..maybe i must change something else?
Corpses have a fade time that can be set in the creature's properties. If the creature has items or coins found as treasure on them, their corpse will either remain until looted or a loot drop placeable (corpse/bones/etc) created where the creature died. Loot placeables that still have loot in them also will not fade out until empty. Most folks handle cleanup functions in an area's OnExit event.
A cleanup functions in an area's OnExit event could be perfect! But i don't know how do it :/
A cleanup functions in an area's OnExit event could be perfect! But i don't know how do it :/
this solution is a little exhaustive if you dont already use same script for every area OnEnter and OnExit which has several advantages
this is easy to do anytime by moneo/letoscript (when I get home I send a letoscript to add script into each area) but there is a different method which wil allow you do do this without need to modify every area - placeable with OnHeartbeat script - can send later if you are interested in this - its a single placeable you will place into any area and this cleans loots from whole module
Yes..the last could be easy way maybe!!![]()
Yes..the last could be easy way maybe!!
trash_hb.nss
int GetIsPCInArea(object oArea)
{
object oPC = GetFirstPC();
while(GetIsObjectValid(oPC))
{
if(GetArea(oPC) == oArea)
{
return TRUE;
}
oPC = GetNextPC();
}
return FALSE;
}
void main()
{
int nTh = 1;
object oArea,oItem, oTrash = GetObjectByTag("BodyBag");
while(GetIsObjectValid(oTrash))
{
oArea = GetArea(oTrash);
if(GetIsObjectValid(oArea) && !GetIsPCInArea(oArea))
{
oItem = GetFirstItemInInventory(oTrash);
while(GetIsObjectValid(oItem))
{
DestroyObject(oItem);
oItem = GetNextItemInInventory(oTrash);
}
}
oTrash = GetObjectByTag("BodyBag",nTh++);
}
}
Place into any non-static (and prefferaly plot) placeable into OnHeartbeat event.
thanks ![]()