Ambrosia Garden Archive
    • Passive NPCs


      Would it in any way be possible to have an NPC that moves in the following way:

      Passive, (so it doesn't attack the player)
      Roam freely, (as if the player wasn't there)
      Not Run away from the player, (Even if its being attacked)
      And be able to be attacked by the player (and continue to move in the same way?)

      Thanks for any ideas you have!

    • I made an NPC of type "passive" who is blind (0 line of sight). When I attack him, he attacks as well but if I run one tile away from him he can no longer see me and continues his stroll. I suppose if you give the NPC 0 dexterity and no attack animation it will look like it's not attacking you.

      Good luck with whatever you're making.

    • In addition to what Ledorax suggests, I think you want morale = 0 (he'll never run away} and damage = 0 (so he has no attack). Since the NPC and the Player cannot occupy the same tile, this should appear as if the NPC is just ignoring the player. If Stamina > 0, the player will be able to attack the NPC. This NPC probably has no collision sphere as well.

    • well i need an NPC that can perform the switch to random animation action at the end of his animation.

      The thing is, when ever he gets near the player, he ignores the switch to random animation and simply does the second animation set it has.....

    • I don't think I understand...

      What are you trying to do, exactly?

    • 1. You need to have some way for the NPC to know he's made contact. I'm using passive NPCs (stamina = 0). When the Player makes contact either deliberately or via the collision sphere, I use the NPC control to delete the passive NPC and add a combat NPC at actualX and actualY. A bit of dialogue is added and therefore the dialogue window hides this action. This actually surprises the Player.

      2. In the animation window, you can add sets of animation. The SECOND set (labeled 1 since the default is always labeled 0) is always the attack animation when connected to an aggressive NPC. So if you have an event connected to your attack animation, then you can switch NPCs to make it work the way you want. This would require you to have not a passive NPC in the first place, but an aggressive NPC. When the NPC is being attacked by the Player and consequently attacking will automatically switch to the attack animation.

      3. The animation window will allow you to switch to random animation at the end of his animation. This works best, of course, with regular animations and passive NPCs.

      4. You can have an animation without connecting it to an NPC and it'll still LOOK like it's an NPC you know. At the end of a rat animation, I have all sorts of events happening.

      The thing with manually deleting and killing aggressive NPCs via the NPC control is that there seems to be a ghost NPC. So I don't manually delete or kill an NPC. This does not happen when deleting a passive NPC.

      More information would be helpful though. I can't quite make out what you're doing here either. Sounds interesting! whahahahaha

    • I'm sorry I wasn't exactly clear.

      I would like to have a sprite that moves around the screen and acts as an NPC would.

      However I want it to switch to a random animation at the end of each animation set. It can't switch because it is an NPC and each animation set has a distinct function..

      0 is for the default walking, 1 is for attacking etc.

      So I thought I could make it a sprite, but I want the player to be able to attack it...

      I hope that clears things up...

    • Okay, so look at the challenge another way. Make a series of NPCs, all with the different "walk" animations you want. Have NPC#1 "walk" to a particular tile instead of just walking around. Once he reaches the tile, make a random event that will delete NPC#1 and add NPC#4 or whatever NPC the random event chooses. (Remember that "0" is a number in random events. Also remember to set the random global to 0 at the TOP of the event.) Each NPC "walks" to a different tile and each tile once reached has the same random event minus the NPC that "walks" to that particular tile. It will give you what you want and all NPCs can be aggressive so the Player can still attack it. The problem here would be ghosts, but you might try it anyway. The way to get around THAT problem is to make them all passive until the Player comes in contact with it, and then replace the passive NPC with an aggressive one with actualx, actualy.