How do I start an NPC laying on the ground until healed?
#1
Posté 13 février 2010 - 09:50
I want to start an NPC laying on the ground (deadish) until the PC examines and heals him.
Any suggestions?
Thanks!
#2
Posté 13 février 2010 - 10:13
Never did that myself so I'm just throwing guesses, but maybe a simple custom core to the creature using the YadayadaSPAWN and the click/use events ? The spawn part should be able to force the npc into a laying animation.
What I'm not sure of, off the top of my head, is the healing part provided you meant "heals him through magic".
#3
Posté 13 février 2010 - 10:17
For examinations and healing i think you can set a dialog with the NPC.
#4
Posté 13 février 2010 - 10:18
#5
Posté 13 février 2010 - 11:52
#6
Posté 14 février 2010 - 12:29
I see the variables that make the dying soldier lay down (AMBIENT_ANIM_PATTERN = 17 and AMBIENT_SYSTEM_STATE = 15), and I see the plot and script associated with the soldier, but I don't see how he gets up. How do I change these values to make the NPC be standing whenever he is encountered again after he is healed?
#7
Posté 14 février 2010 - 12:34
(Edited to correct the function call to the more standardized method.)
Modifié par Craig Graff, 14 février 2010 - 01:19 .
#8
Posté 14 février 2010 - 12:36
#9
Posté 14 février 2010 - 01:00
Craig Graff wrote...
Give him a new AMBIENT_ANIM_PATTERN from ambient_ai.xls with SetLocalInt (something like 2 should work).
Just for future reference, aren't we to use Ambient_OverrideBehaviour() and such to alter ambient behaviour on the go ? The 2DA comments say so, but since they're not always up to date, I'm just making sure.
Modifié par Phaenan, 14 février 2010 - 01:02 .
#10
Posté 14 février 2010 - 01:18
#11
Posté 14 février 2010 - 01:24
The wiki only lists up to 10 (sorry, make that 16 because the wiki says the values are in hexadecimal - it doesn't list the hex equivalent of 15).
#12
Posté 14 février 2010 - 01:30
Modifié par Phaenan, 14 février 2010 - 01:30 .
#13
Posté 14 février 2010 - 06:29
Craig Graff wrote...
Give him a new AMBIENT_ANIM_PATTERN from ambient_ai.xls with Ambient_Start (something like 2 should work).
So, do I do this from within the plot script like this:
case HEAL_WOLFMIER: // Wolfmier stands up when healed.
{
SetLocalInt(oConversationOwner, AmbientAnimPattern, 2);
break;
}
Or do I do something else using Ambient_Start? I'm not sure how Ambient_start fits in.
The goal is to make it so that once the character is healed he always starts out with the ambient relaxed (standing).
Thanks!
#14
Posté 14 février 2010 - 07:12
#15
Posté 16 février 2010 - 01:13
Phaenan wrote...
If I understood correctly, you won't need Ambient_Start() if you want to permanently change the NPC behaviour. So a SetLocalInt(oNPC, "AMBIENT_ANIM_PATTERN", 2) should work, even you may have to wait until the NPC ends his/her current animation set before the new pattern actually kicks in.
You are right, but i read on toolset wiki that it's better to use the Ambient_*() functions.
social.bioware.com/wiki/datoolset/index.php/Ambient_behaviour





Retour en haut






