Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Npc go starving..
Author Message
Handred
Apprentice
*

Posts: 28
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Jul 2012
Reputation: 0



Post: #1
Npc go starving..
Hello!

I teleport into a random city, let's say, Vesper.
I wake up the sector, then all the npcs show that they are starving all at the same time.

Thing is.. here are my flags:
// NPC AI settings
// NPC_AI_PATH 0001 NPC pathfinding
// NPC_AI_FOOD 0002 NPC food search (objects + grass)
// NPC_AI_EXTRA 0004 NPC magics, etc
// NPC_AI_ALWAYSINT 0008 Always be as smart as possible with pathfinding
// NPC_AI_INTFOOD 0010 NPC food search (more intelligent and trusworthy)
// NPC_AI_COMBAT 0040 Look for friends in combat
// NPC_AI_VEND_TIME 0080 vendors closing their shops at nighttime
// NPC_AI_LOOTING 0100 loot corpses an the way
// NPC_AI_MOVEOBSTACLES 0200 if moveable items block my way, try to move them
NPCAI=0001|0008|0040|0200

What the hell?
07-24-2012 01:21 PM
Find all posts by this user Like Post Quote this message in a reply
Gil Amarth
Journeyman
*

Posts: 189
Likes Given: 2
Likes Received: 1 in 1 posts
Joined: May 2012
Reputation: 0



Post: #2
RE: Npc go starving..
The trigger @Hunger only fires when a sector is awake, so it is normal that all your npcs fires the trigger at the same time when you awake a sector.

All the timers drop to 0 into your npcs, and donĀ“t fires until this sector is awake.
07-24-2012 07:03 PM
Find all posts by this user Like Post Quote this message in a reply
Khaos
Master
**

Posts: 595
Likes Given: 166
Likes Received: 83 in 51 posts
Joined: Mar 2012
Reputation: 11



Post: #3
RE: Npc go starving..
Code:
on=@hunger
food=<maxfood>
return 1

Might be src.food=<src.maxfood>; not sure. Not looking at the trigger functions Tongue. Some NPCs I set this on and remove foodtype and foods from them. It really is needed for tamed creatures and any advanced NPC feeding script.

I mean unless you are really needing them to find food or what not realistically... there is no point in starving them. If needed I can generate a more advaced code for you, but that would do the trick when then sector activates.
07-25-2012 08:17 AM
Find all posts by this user Like Post Quote this message in a reply
Handred
Apprentice
*

Posts: 28
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Jul 2012
Reputation: 0



Post: #4
RE: Npc go starving..
That's a lot of on=@hunger to add, because it seems to not be fired inside a common npc event..?
07-25-2012 01:48 PM
Find all posts by this user Like Post Quote this message in a reply
Anarch Cassius
Master
**

Posts: 273
Likes Given: 19
Likes Received: 10 in 9 posts
Joined: Mar 2012
Reputation: 2



Post: #5
RE: Npc go starving..
It fires in a common event for me.

Current Projects: Necromancy SCP overhaul. Custom Faction AI/System. Imbuing.
07-26-2012 10:19 AM
Find all posts by this user Like Post Quote this message in a reply
Shaklaban
Master
**

Posts: 378
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Mar 2012
Reputation: 8

DOT

Post: #6
RE: Npc go starving..
yeah me too.
07-26-2012 10:25 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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