No hit sounds

For questions relating to POL scripting (not necessarily related to WoD)

Moderators: Siobhan, Sebastian, Drocket

No hit sounds

Postby SDonald on Sat Jan 17, 2004 1:31 am

Drocket,
This problem has driven me mad for days now and I have nothing else to check....

I based a moredhel npc on your praetorians by copying the directory and making the obvious changes - npcdesc, pkg.cfg, renaming files and references within the directory etc. There are no other references to praetorians in the pol directory that are wrong.

It all works fine except for one thing.... there is no sound at all when a player attacks one of these new monster warriors no matter what weapon is used.

Attacking someone with ai_moredhel_archer is ok, but attacking anyone with the ai_moredhel_warrior script isn't. My ai_moredhel_warrior script is identical to your ai_praetorians_warrior except for referring to a moredhel.inc file). I've been going around in circles over this and eventually decided the line in the :weapons:combat_attack_script_xxxx is not working in the function PlayHitSoundeffect ()
PlaySoundEffect (defender, sound_effect);

It's as if the defender (my new npc) is not registered for some sort of sound event, but darned it I know what to look for.

By the way, it works fine for Praetorians, just not my Moredhel.

Any clues?
My Moredhel
SDonald
Regular Poster
 
Posts: 102
Joined: Fri Oct 11, 2002 7:47 am
Location: Australia

Postby SDonald on Tue Feb 03, 2004 11:56 am

Well I finally solved my problem.
It was all to do with shields in the hitscripts. In my scripts the defender is awarded some skill points if their parry < 10.
After the endif statement to award some points, the script leapt past the hitsound function and so it was never heard.

I had never seen it before because in no other case had I had an NPC with a shield and forgotten to include a parry skill in the npcdesc entry!

Why tell you Drocket? Perhaps you are the only person I can tell who knows how frustrating a script logic error can be.
SDonald
Regular Poster
 
Posts: 102
Joined: Fri Oct 11, 2002 7:47 am
Location: Australia


Return to Scripting Forum

Who is online

Users browsing this forum: No registered users and 1 guest

cron