Modify message

Subject:
Message icon:

Attach:
(Clear Attachment)
(more attachments)
Restrictions: 4 per post, maximum total size 1024KB, maximum individual size 1024KB
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:
Type ot the full word: TUR**:
Finish the word: Turok 2: Seeds of ****:
Finish the word: Turok Dinosaur ******:

shortcuts: hit alt+s to submit/post or alt+p to preview


Topic Summary

Posted by: BehemothProgrammer
« on: November 10, 2017, 04:52:09 PM »

The agitation value(range 0..299) of an enemy tells you if they are going after the target or not. There's no way to get the value directly but certain AIFlags can indicate it's current value. So you could try to simulate the agitation.

- If the ai sees the target then the agitation value will remain at max value 299. The AIF_SEETARGET = (1 << 9) AIFlag doesn't seem to turn off after the enemy loses sight of the target. Maybe the use of the actors CanSee function would be better instead?
- agitation > 150 means the ai is running after you
- if the AIFlag AIF_RUNNING is on then it's value is somewhere between 150 and 299
- agitation is max if AIF_HEARDLOUDNOISE = (1 << 3) or AIF_HEARDQUIETNOISE = (1 << 16) AIFlags is on
- if AIF_DAMAGEPANIC = (1 << 23) was off but is now on then agitation is 299
- takes about 12 seconds for agitation to go from 299 to 0. And about 6 seconds from 299 to 150. (goes down by intervals of 7)

Can the ai see me? (max agitation value)
- ai target is me
- can see me

Is the ai looking for me?
- target is me
- can't see me
- simulatedAgitation > 0

Is the ai wandering around?
- target is null or can't see target
- simulatedAgitation == 0
Posted by: Smoke39
« on: November 09, 2017, 09:42:14 PM »

Been trying to come up with a way to determine when an enemy is just standing or wandering around.  I tried using kActor::GetTarget(), but it seems to get set to the player once you're within a certain range, even before they notice you.  It's also non-null even before that. (edit: this was an error in my testing)

kAI::AIFlags() or the enemy's animation can check for running and attacking, but standing, turning, and walking are all used both in and out of combat.

Any ideas?
SimplePortal 2.3.6 © 2008-2014, SimplePortal