Author Topic: Fleeing monsters  (Read 5690 times)

Epictus

  • Posts: 12
  • Maggot Crusher.
    • View Profile
Fleeing monsters
« on: October 26, 2015, 08:08:54 PM »
Hi it's me again, I was wondering if anyone knows how to set a monster with a negative aggro of some sort or just set to flee, to make him run away from you instead of running after you. A little like having a minion in a boss fight, set to heal the boss and running away from you, that you must kill in order to stop the boss from healing.

Thank you.

rpc190

  • Posts: 44
  • Map Maker
    • View Profile
Re: Fleeing monsters
« Reply #1 on: November 08, 2015, 09:55:23 PM »
Short answer, no. Long answer, kind of.

Two ways to accomplish this. The first which I don't really like would only work in a controlled environment (like a boss fight) and would involve using a lot of MoveAIs to pathnodes that turned on and off based on where the player is. It would a lot of scripting but it could work.

The second way which I think is far superior would be to use the blink ability which can be assigned to a caster or composite actor. Note that there is a different between a blink and teleport ability. Blink is inherently defensive, it will always be away from whichever player came in range to trigger the blink. So you could assign a short distance blink on a low cooldown and it would have the effect of running away from players if they got close. You could further control this during a boss fight by attaching conditionals to the blink skills based on global variables. The hard part and downside to this is animating it to be running away is next to impossible unless you have an enemy that looks the same when moving in all directions.

If you want to play around with this try making a copy of lich_1_elite. Remove it's seeker ability and modify blink to be something like this:

Code: [Select]
<dictionary name="blink">
<entry name="timer"><int>150</int></entry>
<entry name="range"><float>1.5</float></entry>
<entry name="dist"><float>1</float></entry>
<entry name="effect"><string>effects/particles.xml:none</string></entry>
<entry name="sound"><string>sound/misc.xml:none</string></entry>
</dictionary>

Have fun chasing that around.

Epictus

  • Posts: 12
  • Maggot Crusher.
    • View Profile
Re: Fleeing monsters
« Reply #2 on: November 10, 2015, 02:56:44 AM »
Yes those were the 2 options I've been thinking about, I already worked with the blink but didnt like it since it always went in a single repeated direction, it was not really feeling as if the monster was running away in a clever way, I thought about an other way to make them flee, it works like the blink but is smoother, I just gave the monster some negative movement speed, that way it looks more like hes running away (worked well with a single faced monster like the slime and have yet to try with a 8 faces monster), combining it with blink feels great and gives it the opportunity to escape corners and walls when it's stuck.

**EDIT** Just tried a 8 faces monster and it works like a charm, he's turning it's back on the character to run away :) Awesome!!
« Last Edit: November 10, 2015, 03:03:25 AM by Epictus »

rpc190

  • Posts: 44
  • Map Maker
    • View Profile
Re: Fleeing monsters
« Reply #3 on: November 10, 2015, 09:56:22 PM »
Negative moment! Brilliant idea.

Epictus

  • Posts: 12
  • Maggot Crusher.
    • View Profile
Re: Fleeing monsters
« Reply #4 on: November 11, 2015, 02:17:28 AM »
It is always the simplest things that are the most effective, and that we don't think of :P