I’m having an issue getting my code to function correctly. I just want a simple strength test - 17 > = PASS. 16 < Fail
Its supposed to be a simple - move statue/destroy statue/create new statue, provided the test is met.
As it stands now everyone passes the test…
I’m not entirely sure I’m even using the right function, and have searched for other functions…
Code so far:
void main()
{
object oPC = GetLastUsedBy();
if (!GetIsPC(oPC)) return;
if ( GetAbilityScore(oPC, ABILITY_STRENGTH, 17 ) )
{
object oZeldaChime = GetObjectByTag("ZELDA_CHIME_01");
SoundObjectSetPosition(oZeldaChime, GetPosition(oPC));
SoundObjectSetVolume(oZeldaChime, 127);
SoundObjectPlay(oZeldaChime);
string sBrickscrape = "as_dr_stonmedop1";
DelayCommand(0.3, PlaySound(sBrickscrape));
DestroyObject(OBJECT_SELF, 0.5);
CreateObject(OBJECT_TYPE_PLACEABLE, "statue043", GetLocation(GetWaypointByTag("STAT_LOC_01")));
}
else if ( GetAbilityScore(oPC, ABILITY_STRENGTH, 16) )
{
AssignCommand(oPC, ActionSpeakString("You lack the adequate strength to move the statue..."));
}
}
Thnaks guys…