Forum rules - please read before posting.

Smarter NPCs.

edited November 2015 in Technical Q&A
I wonder if there's a simple way to give NPCs some kind of "memory", so that they behave more "intelligently". I know that this could be accomplished using local or global variables, but this approach becomes messy really quick. What I'm talking about would be more like instance variables.

Example: During the first interaction NPC1 told the player where the gems are hidden. Now that the player talks to NPC1 for the second time, he would not repeat that information. Instead, he will say "You already know where the gems are".

Comments

  • edited November 2015
    Don't want to use awesome variables huh ? :)
    Delete or change a sprite's visibility when u run your action list again check it's state and do smth.
    I described it here
  • Local variables were added to make it easier to sift through the number of variables in large projects.  I feel that a sub-sub-category of variables would make things overly-complicated for the user.

    However, it's completely possible to declare a variable in a custom script, attach it to the NPC, and then use custom Actions to read/write it however you like.
  • >>However, it's completely possible to declare a variable in a custom script, attach it to the NPC, and then use custom Actions to read/write it however you like.

    This seems to be exactly what I was looking for. Thanks for making AC so flexible!


    >>Delete or change a sprite's visibility when u run your action list again check it's state and do smth.

    Sounds like an interesting and original idea, at least for the Booleans :)
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.