Aller au contenu

Photo

ambient behavior - New question. Can you set how long for the ani...


  • Veuillez vous connecter pour répondre
5 réponses à ce sujet

#1
Sonmeister

Sonmeister
  • Members
  • 167 messages
I've been trying to set up ambient behavior on a quest giver (can it be set on a QG?)  - seems simple enough.  AMBIENT_SYSTEM_STATE and AMBIENT_ANIM_PATTERN.  So I set the state to #1 (and I tried #2) and I set the pattern to #100 which is a squat-by-fire.  It is not working.  I've set it on the instance and the template (which I don't really want it on the template since the instance is used somewhere else and I want another pose).
Would a stage interfere with the ambient state and pattern being set?  The QG being set is inactive until a plot flag is set and then spawns active - would this interfere?  He spawns fine after the flag just doesn't do the pattern.  Any suggestions to try or feedback?  Thanks!

EDIT:  It's working now.  I guess I didn't realize how close you have to be for the animation to show and how little is shown.  Can you set the animation to go longer if it's not a looping animation?  Can you set the distance from the PC that the animation begins?

Modifié par Sonmeister, 13 juin 2010 - 04:41 .


#2
Craig Graff

Craig Graff
  • Members
  • 608 messages
You may need to make an extension to ambient_ai.xls in order to get the routine exactly as you want it.

As for having the ambient routine start earlier, you could set the ambient system state to 19, which will make it play all the time (a bit-wise combination of active, spawn active, and always on). If you do this, just keep in mind that having too many creatures set this way in a combat heavy area can degrade performance.

Modifié par Craig Graff, 13 juin 2010 - 05:51 .


#3
Sonmeister

Sonmeister
  • Members
  • 167 messages
Cool, thanks. So how did you come up with the number 19?

#4
Sunjammer

Sunjammer
  • Members
  • 926 messages

Craig Graff wrote...

a bit-wise combination of active, spawn active, and always on


Craig is referring to the following constants (found in sys_ambient_h) which when added together give you 19:

const int   AMBIENT_SYSTEM_ENABLED   = 0x01;
const int   AMBIENT_SYSTEM_SPAWNSTART= 0x02;
const int   AMBIENT_SYSTEM_ALWAYSON  = 0x10;

Modifié par Sunjammer, 13 juin 2010 - 11:40 .


#5
Sonmeister

Sonmeister
  • Members
  • 167 messages
I never understood that you could combine them like that. Good to know. Thanks (looks like 13 though, not 19).

Edit: Thanks for the clarification Phaenan.  Forgot the hex.

Modifié par Sonmeister, 14 juin 2010 - 12:48 .


#6
Phaenan

Phaenan
  • Members
  • 315 messages

(looks like 13 though, not 19).


Sure does, but 13 in hex ("0x13") is actually 19 in dec'. And since you have to set the ambient state value in decimal... :blush:

Modifié par Phaenan, 14 juin 2010 - 01:01 .