ID:162577
Dec 21 2007, 2:04 am
|
|
How can I confine a group of mobs to an area, so that they don't wander aimlessly through the entire map?
|
mob/var/areaGroup //set this to the area type (and subtypes) to allow this mob passage through that area -- Data |
In response to Android Data
|
|
Which is silly and annoying. You would be forced to define, in your code, subtypes of each area that you want to restrict mobs to, instead of creating new instances using the map editor. In addition, that would allow a mob that is forced into an area (for whatever reason) to continue moving around in it, which may be undesirable (I'd rather have a broken monster standing around than a monster tearing through newbies, personally).
|
Any mob with its leashed variable set to true will be restricted to the area it is created in. If you wish to change the leash, then you'll need to set it to a new area. Keep in mind that the mob cannot move while outside its area at all. This will result in a bit of silly behavior, like a mob being stuck at an invisible wall. It will also let players exploit this so that they can lure a mob to an area boundary and then plink away at it with no (or reduced) risk.