-
February 01, 2020, 02:56 AM
#1
Barbarus
How added for AI faction (script)
Hi, Comrads. How added for AI faction money from start company?
I'm put script in scripting.lua. What wrong? Sorry for my English
-----------------------------------------------------------------------------------
-- Money for AI faction (ERE)
-----------------------------------------------------------------------------------
function faction_new_sp_game_startup()
output("faction_new_sp_game_startup() called");
-- Here we get the faction object of the key we pass to this function, store it in the 'roman_faction' variable.
local roman_faction = cm:model():world():faction_by_key("att_fact_eastern_roman_empire");
-- Now we access the faction object 'roman_faction' and check if it is a human player, if not run the treasury function.
if roman_faction:is_human() == false then
cm:treasury_mod("att_fact_eastern_roman_empire", 250000)
end;
-- put stuff here to be initialised on a new singleplayer game
end;
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules