Catacomber wrote:It's an ability--so you have to query it like any other ability--
base_abetherim
I think that's for the hasability() function. Even then, I've tried the following as a rasvim and none of them output "you're rasvim":
- Code: Select all
if (player.hasability("base_abrasvim")) {
message("you're rasvim");
} else {
message("you're not rasvim");
}
and also:
- Code: Select all
if (player.getrace() = base_rasvim) {
message("you're rasvim");
} else {
message("you're not rasvim");
}
The second one above should also have worked (but also doesn't) because I tried:
- Code: Select all
race = player.getrace();
message(race);
which resulted in the output:
- Code: Select all
base_rasvim
I've also tried all possible permutations of the code snippets above with and without quotation marks delimiting abrasvim or rasvim. But still none of them worked.
The closest thing I could get the getrace() to produce a response is with:
- Code: Select all
race = player.getrace();
if (race = base_rasvim) {
message("you're rasvim");
} else {
message("you're not rasvim");
}
which resulted in a runtime error stating:
- Code: Select all
The Quest Editor v1.0: Error in c:\home\development\projects\Quest\Quest1\source\Quest/Core/PointerArray.h at line 345.
Please see: redshift.hu/help
when the dialogue containing that script is selected.
Other than that, the only way to be able to use player's race in dialogue that actually works seems to be possible only by using the PCRace or PCUndead dialogue conditions or with the isundead() function (the latter two of which only differentiates between rasvim and non rasvim, and not with other races). The isundead() function works properly when used like so:
- Code: Select all
if (player.isundead()) {
message("you're rasvim");
} else {
message("you're not rasvim");
}
To conclude, it seems like hasability() and getrace() functions in the script editor/compiler are broken when used to try and match statements with player's race.