Forum rules - please read before posting.

NPC AI

How to archive the following. I want that a NPC is walking away from me unless I have a specific Item in my inventory. While he walks aways he giving out a dialogue like "I said bring me Item X"... NPC is not interactable unless I have the intem in inventory. Is that possible?! If so, can anybody point me in a direction please?

Comments

  • Yes its quite easy to script something like that. Not sure what the trigger would be? Is it that you try to talk to them and they walk away?

    Lets say you want the action to start when you talk to the NPC.

    Create a marker on the scene where you want the NPC to say his line.

    First action would be "Inventory: Check" if carrying "banana".

    If "NOT" carrying the banana, perform a character animation "Walk to Marker".

    Character will then walk to that point.

    Next action "Dialogue : Play Speech"

    Character:NPC
    "I said I wanted a Banana! hmph"

    Next action: walk to final marker (wherever they end up).

    Next action (if they've walked off scene):  Object: Add/Remove - Delete Character.


    Not sure if thats exactly what you wanted, but if not, provide some more detail and i'll see if I can help.

    Thanks
    kev

  • Cool thank you!!!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.