Aller au contenu

Photo

sitting and smithing


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

#1
maglalosus

maglalosus
  • Members
  • 51 messages
Hello, need a couple of scripts for sitting and smiting...

The sitting one i tried wth Lilacs script program... didnt work (i probably did somethnig wrong)

Second one for smithing (banging a hammer onto a nearby anvil) i couldnt find this script in Lilacs program?

Also anyone know how to stop npcs from facing you when you talk to them, so they stay facing the direction they were placed? (so the smithy doesn't start banging thin air with his hammer)Image IPB

Thanks for any advice.

Modifié par maglalosus, 30 avril 2011 - 09:02 .


#2
Kaldor Silverwand

Kaldor Silverwand
  • Members
  • 1 598 messages
Sitting doesn't work the same way in NWN2 as it did in NWN1, so Lilac's can't handle it. There are plenty-o-threads about sitting. Use your Google fu to find them.

I use this script as the On Conversation script to keep them from turning when spoken to. It allows them to speak a one-liner if you want them to but a conversation isn't required.

// bb_noturn_convo
// by Brendan Bellina

// based on f100_noturn_convo from SoZ

// Prevents NPC from turning toward speaker when conversing
// Use as on conversation script

void main()
{
ClearAllActions(TRUE);
if (GetDistanceBetween(GetLastSpeaker(), OBJECT_SELF) < 3.0f)
SpeakOneLinerConversation();
}

Regards

#3
maglalosus

maglalosus
  • Members
  • 51 messages
My Google fu is strong...

Thanks for this one, i assume the name of the 'oneliner' goes in the brackets at the end of the phrase 'SpeakOneLinerConversation( )'

Modifié par maglalosus, 30 avril 2011 - 09:07 .


#4
Kaldor Silverwand

Kaldor Silverwand
  • Members
  • 1 598 messages

maglalosus wrote...

My Google fu is strong...

You should have no problem then. Sitting comes up a lot for some reason.

Thanks for this one, i assume the 'oneliner' goes in the brackets at the end of the phrase 'SpeakOneLinerConversation( )'


No need to edit the script at all. Just create a normal conversation for the creature and SpeakOneLinerConversation will cause the conversation line to appear above the speaker's head.  If you want to see a working example download my Kings Festival campaign and look at the creature c_daeghun in the first module.

Regards

#5
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
If you ever try to use the animations for sitting on the ground, you need to use the ones for PlayCustomAnimation(). The ones linked to the constants found in the NWScript helper don't work.

#6
Dann-J

Dann-J
  • Members
  • 3 161 messages
An OnSpawn script that sets SetOrientOnDialogue() to FALSE will stop NPCs from turning towards you when you speak to them.

I had a smith working at an anvil in Dragonglade. At the time I didn't know about SetOrientOnDialogue(), so I simply made the smith unbumpable and had the script turn them towards a fixed direction when their heartbeat script randomly fired the smithing animation. I also had a custom sound object that synced the hammer blows with hammer sounds.

Modifié par DannJ, 01 mai 2011 - 11:04 .


#7
Shaughn78

Shaughn78
  • Members
  • 637 messages
In Risen Hero I had NPCs sitting with a on enter script. it applied a looping custom animation. With the smith I used a serries of walkpoints, hammeribng blade, cooling blade and heating blade.My blog, smith making sword

If you would like a copy of thee scripts helpyourself, they are in module 01_04, or I can post them here if you want.

Modifié par Shaughn78, 02 mai 2011 - 12:59 .