Aller au contenu

Photo

Make NPCs disappear at night?


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

#26
kevL

kevL
  • Members
  • 4 052 messages

Especially when alcohol is involved... :blink:


Vomit(Random(GetTarget()));
  • Groove Widdit aime ceci

#27
PJ156

PJ156
  • Members
  • 2 980 messages

I use Uncle FB's npc control system when i need to do this. It is all completely set up to apply to instances of multiple npc's and will do all that you need from it and perhaps a little more.

 

The only outstanding issues with the scripts that I can see is that npc's set to walk way points seem to drop multiple items as they move around the map./ that's a buggerance but those npcs can easily be modeled out side of FB's scripts.

 

PJ



#28
Groove Widdit

Groove Widdit
  • Members
  • 378 messages
Sorry, double post.

#29
Groove Widdit

Groove Widdit
  • Members
  • 378 messages
Dann, I'm trying to compile your more recent script and it says "NO RIGHT BRACKET ON EXPRESSION" on line 11.

#30
Groove Widdit

Groove Widdit
  • Members
  • 378 messages
I got it to work. I just did a simple npc heartbeat script. I agree that it seems more organic and self-evident and intuitive to have it as a charcter script--it's part of who they are, like random wander or whatever other scripts they have in there. And they can drift off individually like people really do. I mean, people aren't a brainless herd, or anything...? Anyway. Thansks!

#31
kamal_

kamal_
  • Members
  • 5 238 messages

I got it to work. I just did a simple npc heartbeat script. I agree that it seems more organic and self-evident and intuitive to have it as a charcter script--it's part of who they are, like random wander or whatever other scripts they have in there. And they can drift off individually like people really do. I mean, people aren't a brainless herd, or anything...? Anyway. Thansks!

We are here at Baldur's Gate, where we've secretly replaced the fine npcs players usually encounter with Folgers zombies. Let's see if anyone can tell the difference!


  • GCoyote aime ceci

#32
Tchos

Tchos
  • Members
  • 5 030 messages

Folger's zombies -- only the finest ground-up roasted zombie powder for your hot beverage drinking pleasure.  Now available at the Jovial Juggler.

 

"I drink it, and I don't feel like a zombie anymore!"


  • GCoyote aime ceci

#33
Groove Widdit

Groove Widdit
  • Members
  • 378 messages

This is what I ended up doing. It works. For some reason I get that wierd error when I try to use &&. I could accomplish the same end with a nested if statement, but does it really matter if they're already there when it unhides them? There's only a few so it's not a processor issue.

 

#include "ginc_time"

void main()
{
int iHour = GetTimeHour();
if (iHour == 6)
    {
    SetScriptHidden(OBJECT_SELF, FALSE);
    }
    if (iHour == 22)
    {
    SetScriptHidden(OBJECT_SELF, TRUE);
    }
}
 



#34
Tchos

Tchos
  • Members
  • 5 030 messages

I don't think it would do any harm to send a command to unhide something that's already not hidden.  But as for syntax for &&, you could try extra parentheses, as so:

if ((IsCurrentHourInRange(iTime1, iTime2)) && (GetIsScriptHidden(OBJECT_SELF, TRUE)))


#35
Groove Widdit

Groove Widdit
  • Members
  • 378 messages
Okay I'll remember that.