[crossfire] unaggressive monsters

Preston Crow pc-crossfire06 at crowcastle.net
Sun Sep 6 17:40:09 CDT 2020


That's helpful.  I got it working.  I think my problem was that I was 
editing the map on one system and then copying it over to my server, but 
somehow I missed the update so the server had an old copy.

But knowing how it works is great.  In this case, the value of 3 is 
alright, but I might want to tweak it, so I'll probably change the code 
to let it be dynamic:

     help_radius = object_get_value(op,"help_radius");
     if ( !help_radius ) help_radius = 3;

I think with that, I can set 'help_radius 5' or whatever to a particular 
creature to make it yell louder when attacked.

That's not quite as good as having a monster get angry from seeing 
combat near it, even if it didn't start near it, but it will do.

On 2020-09-06 17:13, Kevin Zheng wrote:
> On 9/6/20 7:53 AM, Preston Crow wrote:
>> I'm trying to create some monsters that aren't aggressive until they see
>> combat near them.  I've taken a regular monster and added 'unaggressive
>> 1' which makes them stand there as expected, but they don't notice
>> fights around them, only when they are attacked.
>>
>> What do I do to make them more trigger happy, but content to stand still
>> and chat most of the time?
> How close are these unaggressive monsters to the monster you attack?
>
> When an unaggressive monster is attacked, it calls
> monster_npc_call_help() in server/monster.c. It currently has
> help_radius set to 3, so monsters too far away will not notice.
>
> Is this consistent with what you observe?


More information about the crossfire mailing list