Is there any resource similar to or equal to that component of the NPC '' Keep out of Player 's way.'' in AC?
I have an Npc that throws a bomb to attack the Player and I want other people or NPCS in the game to stay away from the bomb, fleeing at an adjustable distance.
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Not built-in, but you can attach a custom script that runs equivalent code:
If you're looking to implement an action game with such mechanics, however, it sounds like your game would be better suited to using a different asset to AC - which is intended for traditional adventure games.
These errors appear.
https://uploaddeimagens.com.br/imagens/UR6vCSs
Assets\LeaoDevorador.2.5d\ScriptsPersonalizados\NPCAvoidObject.cs(56,94): error CS0120: An object reference is required for the non-static field, method, or property 'Transform.position'
https://uploaddeimagens.com.br/imagens/WZRUTpw
I filled in the fields, I don't know if I did it correctly, I reduced the errors leaving 3 that I don't know what they are.
https://uploaddeimagens.com.br/imagens/B5UBFvg
I've updated the code above - try it now.
It worked. Thanks.