Hello my fine modding friends, I have a quick question for those of you who have mastered the difficulties of the ScriptingVerse.
I am attempting to spawn two creatures with one script. One of them has a conversation option that will always end in combat (to the death) and the other needs to spawn kneeling.
The kneeling creature should kneel through the battle and only stand once the enemy is defeated at which point the normal dialogue options should open up.
Any ideas?
You would probably have to define an animation for it (don't ask me I have no idea) but have a look in animations.2da see whats there. Ill take a look as well.
void main() {
AssignCommand(GetObjectByTag("my_npc_tag"), ActionPlayAnimation(ANIMATION_LOOPING_MEDITATE, 1.0, -1.0));
}
Try that. Attatch it to the NPC's OnSpawn event, :)
Also, bear in mind that I suck at scripting, so you may have to tinker with it a bit.
^^^ that will work, i think, more or less... Depending on how you are spawning in the creature, you may just want to put it in the area OnEnter... depends on how much module editing you want to do.
What will need to be attached is something that is checking for the death event of the fighting NPC. When that NPC dies, your kneeling creature needs to know, so you would alter the OnDeath of NPC1 to send a message to NPC2, or just set a boolean var that you can check in the kneeling NPC's OnSpawn.
The conditional would be... "if NPC1 is dead then the kneeler needs to get up and initiate convo."
If you need help working that out, I'll be around today off and on
Sorry I'm going to be away for long stretches the next few weeks....
I could probably attach the script that has the kneeling character stand on the "on death" setting of the enemy character.... So far I've been spawning via a .dlg file, though I could use the onEnter for the module instead without much trouble.
@Marius Fett: Much thanks! I'll try that now...