Especially when alcohol is involved...
Vomit(Random(GetTarget()));
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
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!
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!"
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);
}
}
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)))