Jump to content

Ai Package Help.


Scrabbulor

Recommended Posts

I have a few NPCs following one NPC with a Travel package. Is there anyway I could make them use another Package when the NPC they're following dies? Currently they just stand there staring at the corpse and talking to eachother.

 

Thanks in advance.

Link to comment
Share on other sites

I think there's a bool condition "isDeath" or something like this. You can try putting it to false and see if when the followed dies they stop their package.

 

Also i think you have to set it as "must complete".

 

Dunno if it could work tho

 

EDIT: just saw this on CK wiki

 

What if the follow target dies, or is dead?

 

The procedure should be considered invalid and does not run.

 

Did you put another package with the same conditions under the follow package? It should stop running and the game should load the other package

Edited by gasti89
Link to comment
Share on other sites

There are some more script based options, but yeah, if you make a condition for the follow package that the target actor is alive, and put the alternate package below it in the stack, it should update within a few seconds of the npc's death.
Link to comment
Share on other sites

Great, thanks a lot!

@gasti
I have another package below it, both set on Must Complete. I even tried removing the must complete flag from the follow package hoping that would help when the target dies. No dice.
I wanted them all to switch the the leader's patrol data. That way they'd still continue the path but look much more unorganised adding some realism to the patrol indirectly. I'll see if I overlooked any options dealing with alive/death statuses.

@Sinderions
Setting conditions sounds like it'll do the trick, I'll give it a shot.


Can't try them out right now, but I didn't want to leave your replies unanswered. Thanks again! I'm pretty sure one of these will work.

Edit: I'm a bit late... 2000 endorsements late : P but it worked.

Used getdead then instead of running the condition on the subject and changing the target, I changed subject to reference and that worked flawlessly. Thanks in again.

Edited by Scrabbulor
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...