I think HasSoulgem returns true/false, not quantity
Well, the MSFD describes the function with an example like this:
if ( Player->HasSoulGem "atronach_storm" > 1 ) Set counter to ( counter + 2 )elseif ( Player->HasSoulGem "atronach_storm" > 0 ) Set counter to ( counter + 1 )endif
so I assumed it's about quantity. As for the
problem, the script doesn't look like there's something wrong with it, but with CS you never can be sure
. Try to stuff it with debug messages and see if anything happens:
Begin dragonvoice2short doOnceshort countif ( OnActivate ) if ( doOnce == 0 ) set doOnce to 1 elseif ( doOnce == 2 ) set doOnce to 3 endif MessageBox "Activator hit, doOnce=%.0f" doOnceendifif ( doOnce == 1 ) set doOnce to 2 PlaySound3D "Dragon8" ; create a sound pointing to Vo\Misc\Dragon8.wav file Journal "Drag_test3" 10 MessageBox "Message 1" "OK" MessageBox "Quest started, doOnce=%.0f" doOnceendifif ( doOnce == 3 ) MessageBox "Second hit, doOnce=%.0f" doOnce set count to 0 while ( Player->HasSoulGem "0TRP-lostsoul" ) if ( count < 10 ) Player->RemoveSoulGem "0TRP-lostsoul" set count to ( count + 1 ) endif endwhile if ( count >= 10 ) set doOnce to 4 PlaySound3D "Dragon9" ; create a sound pointing to Vo\Misc\Dragon8.wav file Journal "Drag_test3" 20 else while ( count > 0 ) Player->AddSoulGem "0TRP-lostsoul" set count to ( count - 1 ) endwhile set doOnce to 2 MessageBox "You don't have enough souls." "OK" endif MessageBox "Second hit processed, doOnce=%.0f" doOnceendifEnd