Total War: WARHAMMER II

Total War: WARHAMMER II

Create and Share Custom Mods
The best mods for Total War: WARHAMMER II live here. Mods are made by players, for players and are not officially licensed by Games Workshop. Click 'Learn More' below to read our Modder’s Guide.
Learn More
NOD 6 28 Jan, 2022 @ 8:48am
The "is_human()" check does not work / Не работает проверка «is_human()»
Hi! In my mod, in a separate script, there is one line and it is executed correctly. But if you put it under the condition of checking for a human. And playing for the race being checked, the line stops working, although I play for this faction. What could be the problem?
Here is the code:

local beast = cm:get_faction("wh_dlc03_bst_beastmen");
if beast:is_human() then
…. – It doesn't work out, although I play for the Beastmen. Even if I'm starting a new company
end;

/

Привет! У меня в моде, в отдельном скрипте, есть одна строчка и выполняется она корректно. Но если её поставить в условие проверки на человека, то при игре за проверяемую расу, строчка перестаёт работать, хотя я играю за эту фракцию. В чём может быть проблема?
Вот код:

local beast = cm:get_faction("wh_dlc03_bst_beastmen");
if beast:is_human() then
…. – не отрабатывает, хотя я играю за Зверолюдей. Даже если начинаю новую компанию
end;
< >
Showing 1-1 of 1 comments
NOD 6 29 Jan, 2022 @ 4:46am 
Понял, там зверолюдей 4 фракции заведены, мне надо всех проверять на человека:

local beast1 = cm:get_faction("wh2_dlc17_bst_taurox");
local beast2 = cm:get_faction("wh2_dlc17_bst_malagor");
local beast3 = cm:get_faction("wh_dlc05_bst_morghur_herd");
local beast4 = cm:get_faction("wh_dlc03_bst_beastmen");

if beast1 or beast2 or beast3 or beast4:is_human() then
< >
Showing 1-1 of 1 comments
Per page: 1530 50