ACT_NOASSIST

For builders to discuss and ask building questions.
Post Reply
Tarven
Sword Grand Master
Sword Grand Master
Posts: 365
Joined: Tue Jun 19, 2012 3:40 am

ACT_NOASSIST

Post by Tarven » Mon Sep 17, 2012 11:25 pm

Okay, since this flag mentions 'does not assist other mobiles', does that mean that if the mobile does -not- have the flag, that it will assist others? Or does that require an mprog? Basically, I want my mobiles of a certain type, which are non-aggressive, to have a 'swarm' mentality. That is to say, if they see a creature of the same type being attacked, they will attack also.
User avatar
Harroghty
Staff
Staff
Posts: 9695
Joined: Tue Jul 27, 2004 5:38 pm

Re: ACT_NOASSIST

Post by Harroghty » Mon Sep 17, 2012 11:45 pm

Mobiles will join combat nearby based primarily upon alignment and flags (wimpy, aggressive, noassist, nofight). It is not immediate though. Your best bet in the case your are describing is to use a fight program. e.g.

Mobile 234 would have this program.
>fight_prog 100~
if mobinroom(123) > 0
mpforce m123 mpkill $n
endif
~
It triggers every round that m234 is in combat:
>fight_prog 100~
It checks to see if m123 is in the room.
if mobinroom(123) > 0
If so, then it directs m123 to attack m234's attacker.
mpforce m123 mpkill $n
You can get much more complicated if you desire, but that's the simple answer.
"A man may die yet still endure if his work enters the greater work, for time is carried upon a current of forgotten deeds, and events of great moment are but the culmination of a single carefully placed thought." - Chime of Eons
Tarven
Sword Grand Master
Sword Grand Master
Posts: 365
Joined: Tue Jun 19, 2012 3:40 am

Re: ACT_NOASSIST

Post by Tarven » Mon Sep 17, 2012 11:57 pm

Awesome. And if I want it to attack if either 123 or 234 are in the combat, would I use an else command?

So, mob type 1 is non-aggressive. Mob type 2 is aggressive (Like in howling peaks, with the wolves and sentries). If mob type 2 attacks, and mob type 1 is there, it would join mob 2, but also if mob type 1a and mob type 1b are in the room, and someone attacks mob type 1a then mob type 1b will assist mob type 1a?

And I assume that this will have to be applied to unique mobs, yes?
User avatar
Harroghty
Staff
Staff
Posts: 9695
Joined: Tue Jul 27, 2004 5:38 pm

Re: ACT_NOASSIST

Post by Harroghty » Tue Sep 18, 2012 12:01 am

You lost me with 1s and 2s. Put that fight program on the mobile who you want to be aided by another. Give both mobiles the program if you want both types to aid one another. This program could be on simple or unique mobiles.
"A man may die yet still endure if his work enters the greater work, for time is carried upon a current of forgotten deeds, and events of great moment are but the culmination of a single carefully placed thought." - Chime of Eons
Tarven
Sword Grand Master
Sword Grand Master
Posts: 365
Joined: Tue Jun 19, 2012 3:40 am

Re: ACT_NOASSIST

Post by Tarven » Tue Sep 18, 2012 12:10 am

Ahhh, put it on the one to -be- aided. Perfect! Thanks!
Post Reply