Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
player_own_modify_faction = nil;
core:add_listener(
"playerStore_api_byHy_listener",
"FirstTickAfterWorldCreated",
function(context)
return true
end,
function(context)
local player_query_faction = cm:query_local_faction();
if(player_query_faction) then
local m_faction = cm:modify_faction(player_query_faction)
player_own_modify_faction = m_faction
end
end,
true
)
Okay, I have solved it now !I used "FirstTickAfterWorldCreated" add_listener,Successfully got modify_faction .
local faction_key = context:faction();
and using this as your modify key.
local modify_faction = cm:modify_faction( faction_key )
hope this helps. If you need more in depth help, do join the discord.
If you have free time, I hope you can take a look ,Thank you
---------------------------------------------------------------------
ERROR: can_modify() failed - no model interface is present. Last event triggered is ComponentLClickUp
stack traceback:
[string "script\_lib\lib_mod_loader.lua"]:73: in function 'script_error'
[string "script\_lib\lib_campaign_manager.lua"]:1398: in function 'can_modify'
[string "script\_lib\lib_campaign_manager.lua"]:1412: in function 'modify_model'
[string "script\campaign\mod\playerstore_byhy.lua"]:255: in function 'callback'
[string "script\_lib\lib_mod_loader.lua"]:245: in function <[string "script\_lib\lib_mod_loader.lua"]:245>
[C]: in function 'xpcall'
[string "script\_lib\lib_mod_loader.lua"]:245: in function 'event_callback'
[string "script\_lib\lib_core.lua"]:1138: in function <[string "script\_lib\lib_core.lua"]:1138>
**************
---------------------------------------------------------------------
I created a button in the main interface, When I click the button, I want to modify the money, but an error is prompted !
"cm:modify_model()" : This command cannot be used !!!
Thank you very much !!!