Aller au contenu

Photo

[Solved] Make an npc to just sit down?


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

#1
Patrikbm

Patrikbm
  • Members
  • 3 messages
 so my brain is a bit fuzzy atm, Ive been sitting way to many days in a row with the toolset.. but anyway, a minor problem has come up now, how can I make a npc to just sit down at all times, Im trying to make an npc to just sit on a bench.

Maybe its just the lack of sleep thats keeping me from thinking straight, but how can I fix this sit-down problem? ^^

Modifié par Patrikbm, 08 mai 2010 - 03:47 .


#2
RecklezzRogue

RecklezzRogue
  • Members
  • 193 messages
You can use the ambient system to issue an animation command for sitting down. One of the animations you could use is
104
                interact_sit_chair


The command you could use for the NPC could look as follows:

Ambient_Start(oLarson, AMBIENT_SYSTEM_ENABLED,AMBIENT_MOVE_INVALID,AMBIENT_MOVE_PREFIX_NONE, 104);// Interact_sit_chair.

Note - You need to look up the ID for the animation you want to use in ambient_ai.xls in the dragon age/tools/source/ directory.

Note 2 - if you want the NPC to be sitting when the area loads, before the player can see anything,  place this command within the "case EVENT_TYPE_AREALOAD_PRELOADEXIT:" segment of your area script.

Modifié par RecklezzRogue, 08 mai 2010 - 02:27 .


#3
Kilrogg_

Kilrogg_
  • Members
  • 296 messages
I'm pretty sure you can just do this on the character itself using the variables table, instead of doing it via scripting. I don't remember how though :(

#4
RecklezzRogue

RecklezzRogue
  • Members
  • 193 messages
You are correct - you can do this either with "open resource" (which affects all copies in the area), or you can do it by setting the variable for the creature in the area itself (right click on the creature,  select the variable elipsis from the object inspector).

Make sure ambient_system_state is 1 (or 19 for always on - probably not needed though), then set ambient_anim_pattern to 104 using my example from above.

I like to use scripts as it's easier to diagnose/adjust (for me). But - to just get the job done, this is probably a better way
kil. ;-)

Modifié par RecklezzRogue, 08 mai 2010 - 02:53 .


#5
Patrikbm

Patrikbm
  • Members
  • 3 messages
ah, thanks guys :D

Yeah I have a tendancy to make things harder than it should be, but now it finally works, hehe :P

off to bed for me now :P

#6
RecklezzRogue

RecklezzRogue
  • Members
  • 193 messages
;-)

Modifié par RecklezzRogue, 09 mai 2010 - 04:38 .


#7
McAden

McAden
  • Members
  • 12 messages
I followed RecklezzRogue's instructions and my NPC sits...after appearing about 10 feet away from where she was placed, walks through a wall, and sits IN a door, rather than on the bench where she was placed.



Any ideas why?