So in an object script I do this but get an error saying it expects an integer:
if aaDPSCABOWSWAYquest.RaceIndex != 999call aaDPVocalizationOfCriticalHit justafakeendif
In the "function" object script I am doing this:
ScriptName aaDPVocalizationOfCriticalHitRef PRaceshort JustAFakeBegin Function {JustAFake}if aaDPSCABOWSWAYquest.RaceIndex == 999 returnendif;-------------------if aaDPSCABOWSWAYquest.RaceIndex == 0 set PRace to Player.GetRace if PRace == orc set aaDPSCABOWSWAYquest.RaceIndex to 1 elseif PRace == nord set aaDPSCABOWSWAYquest.RaceIndex to 2 endif if player.isfemale == 1 set aaDPSCABOWSWAYquest.RaceIndex to aaDPSCABOWSWAYquest.RaceIndex * 10 endifendif;---------------if aaDPSCABOWSWAYquest.RaceIndex == 1 playsound aadpMCHImp elseif aaDPSCABOWSWAYquest.RaceIndex == 10 playsound aadpFCHImpendifset aaDPSCABOWSWAYquest.RaceIndex to 0end