A couple of problems
Submitted by ghastley on Sat, 2007-03-24 11:19 | ||
1. I can't get "on_enemy_entered_ocz_flee" to work. I'm trying to get a pair of invincible gladiators (secutor/retarius) to put on a show, but the retarius won't run away. Flee_count is 9999, so that's not exhausted. I have to write a new brain skrit later, so that when the secutor is entangled in the net, the retarius switches to melee and jabs with the trident, but I'm trying to do one step at a time. 2. Invisible boots. My Lara character wears her own boots without problems, but most others become invisible. All the meshes are copied and renamed from the working one, so there should not be a mesh weighting problem, and the templates for the boots are untouched. Anyone have any ideas on either problem? forums: |
||
» |
"Ignore it and it will go away" is working!
Already the invisible boots problem is solved (a naming key problem made the game look in the wrong place for bitmaps).
Now for the "flee" problem!
Abstraction site
Dungeon Raider
I don't know anything about the skrit in question (or skrit at all really) but the one thing that jumps into my mind is "where to flee to...". If there is no preset destination, how is a direction determined for the "fleeing"?
The skrit is triggered by the enemy entering the OCZ. The flee direction is away from that enemy (facing + 180 degrees). This direction may (in general) be blocked, and I'm not sure what the next choice is, but in the test setup I'm using there is no blockage.
I recall that a number of mobs in DS1 did this, with a flee count of 1 in most cases. The trolls would run away when their health dropped below a threshold, the darklings as soon as you got close enough. However, I can't think of a mob that flees in DS2, so it could be broken there. I ought to check that they didn't make the flee toward the enemy intead of away!
Abstraction site
Dungeon Raider
i dont have the answer, but i think the answer lies in templates.gas and the actor template, take for instance in ds2
flee_distance = 8.0;
sight_range = 12.0;
melee_engage_range = 2.0;
inner_comfort_zone_range = 4.0;
outer_comfort_zone_range = 6.0;
ok the flee distance plus the inner confort zone = sightrange of 12 so technically the enemy can see ya and will want to attack so maybe increasing flee distance or lowering ranges would help but again i dont know. flee_distance = 20.0; may work.
brain monster skrit in ds2 has these
// flee behavior
property float fleeing_enemy_ignore_timer$ = 6.0 doc = "Time spent ignoring the enemy once we've descovered its fleeing from us. ( will reset if enemy attacks us )";
property float fleeing_enemy_min_home_distance$= 16.0 doc = "We don't consider the enemy fleeing unless we are a certain distance from home";
ganth uses jat_brain = world\ai\jobs\common\brain_monster.skrit
?coach_template = "ganth_coach"
&fleeing_enemy_min_home_distance = 25;
and the tacklac monster uses the timer
Rethinking this from scratch, if you're trying to "put on a show", then what's wrong with setting up an action flick sequence with preset movements? Why rely on an existing skrit for movement when there should be flick commands for this... or am I misunderstanding what you're trying to achieve here?
That could be a plan B, but the idea here was that the action would be random. The two contestants in the arena would react to each other rather than follow a looped sequence, which would become a lengthy piece of flick if it's not to be an obvious loop. I may also do both scripted and unscripted if I decide to add another pair in the arena, because unless the others are neutral aligned, the first pair will start to fight them!
The other aspect is that I may want to reuse the same characters when the player character enters the arena against them, and I can't script that.
Abstraction site
Dungeon Raider
There are two sets of parameters here: one controls the actions of the mob when it is fleeing, and the other when it is doing the chasing. Anything with "fleeing_enemy" is the latter.
I've played with the various zone sizes, but there are some constraints here. I can't have the running character get out of sight range of the chasing one, or it will stop chasing. I need the ranged one to attack once the distance is enough, so flee_distance can't be more than sight_range, although it could be more than the weapon range, which must be more than the OCZ_range.
Since there are two combatants, one must have good alignment, so I may simply have broken the connection to the right brain skrit and reverted to the hero one (heroes don't flee). Thanks for reminding me about templates!
Abstraction site
Dungeon Raider
The battle between the morden and the rebels in Kalrathia is a good example of how to make them react to eachother....