Author Topic: How to make the Player Character Controlable shout "Obidae O bidu Ah Badach!"?  (Read 319 times)

Legacy_WhiteTiger

  • Hero Member
  • *****
  • Posts: 889
  • Karma: +0/-0


               

What's the code that makes the Speaker say the sounds of casting spells?


 


I was searching in Lexicon and I found "PlayVoiceChat" (nothing what I'm looking for): http://www.nwnlexico...itle=Voice_chat



               
               

               
            

Legacy_WhiZard

  • Hero Member
  • *****
  • Posts: 2149
  • Karma: +0/-0


               

PlaySound() works for this.  Use spells.2da to get the string name for the sound under the column "ConjSoundMale" or "ConjSoundFemale".



               
               

               
            

Legacy_WhiteTiger

  • Hero Member
  • *****
  • Posts: 889
  • Karma: +0/-0


               

PlaySound() works for this.  Use spells.2da to get the string name for the sound under the column "ConjSoundMale" or "ConjSoundFemale".



 


Perfect. Thank you!



               
               

               
            

Legacy_WhiteTiger

  • Hero Member
  • *****
  • Posts: 889
  • Karma: +0/-0


               

Whizard, I have this:


 


=======================================


Animation Conjuring Hands Up:


AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_CONJURE2, 1.0, 3.0));


 


Sound:


PlaySound("vs_chant_evoc_lm"));


=======================================


 


But I also need the visual effect of casting spell hands up... do you know how?


 


Is it ConjHeadVisual: vco_mehedelec01? (<< this don't work with effectvisualeffect)



               
               

               
            

Legacy_Thayan

  • Sr. Member
  • ****
  • Posts: 435
  • Karma: +0/-0


               

Maybe this function would work for you?

// The action subject will fake casting a spell at lLocation; the conjure and
// cast animations and visuals will occur, nothing else.
// - nSpell
// - lTarget
// - nProjectilePathType: PROJECTILE_PATH_TYPE_*
void ActionCastFakeSpellAtLocation(int nSpell, location lTarget, int nProjectilePathType=PROJECTILE_PATH_TYPE_DEFAULT)

 


It would be just something like (obviously replacing SPELL_FIREBALL with whatever spell has the visuals and casting animation you want) -


AssignCommand(oPC, ActionCastFakeSpellAtLocation(SPELL_FIREBALL, GetLocation(oPC));



               
               

               
            

Legacy_WhiteTiger

  • Hero Member
  • *****
  • Posts: 889
  • Karma: +0/-0


               

I'll try to do it and then talk to you



               
               

               
            

Legacy_WhiteTiger

  • Hero Member
  • *****
  • Posts: 889
  • Karma: +0/-0


               


It would be just something like (obviously replacing SPELL_FIREBALL with whatever spell has the visuals and casting animation you want) -


AssignCommand(oPC, ActionCastFakeSpellAtLocation(SPELL_FIREBALL, GetLocation(oPC));




 


Works 100% !!! Thank you very much!


 


obs: you missed to insert the final ) in the end of the script XD