![]() |
Strange issue with NPC equipping item - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: Strange issue with NPC equipping item (/Thread-Strange-issue-with-NPC-equipping-item) |
Strange issue with NPC equipping item - Soulless - 07-19-2017 02:27 PM So, I have an NPC ive made and it has a trigger under it's chardef that is supposed to make it decide what item to equip during what circumstance Here's the chunk of code that makes it decide what to do Code: on=@NPCActFight so what happens is that it actually equips the item on the player he is attacking. first it equips the bow on the player because he's typically more then 2 tiles away, then since he doesnt have anything in his hands he charges at the player, then when he's within 2 tiles it equips the axe onto the player. am i using findid wrong? have I been away too long and lost my goddamn mind? here's the whole thing chardef included Code: [CHARDEF c_headless_horseman] ![]() RE: Strange issue with NPC equipping item - darksun84 - 07-19-2017 06:01 PM You have to do: Code: on=@NPCActFight Using findid.i_axe.equip will cause the SRC to try to equip the weapon, and in @NpcActfight SRC is the player being attacked. RE: Strange issue with NPC equipping item - Soulless - 07-20-2017 02:32 AM Thank you my good man, and that you are, a very very good man |