Adding act to an existing character


Recommended Posts

Hello

How to add an act to an existing character ?

I have tried 

GetPlayerBackground( "ROOK" )
        :AddAct{

but with no success, I get the following error :

21:17.47-Lua: Error calling function from engine: scripts/game_profile.lua:532: attempt to index a nil value (local 'act_data')
stack traceback:
	scripts/game_profile.lua:532: in method 'GetMaxAdvancement'

Thanks in advance (and for your great game !)

Link to comment
Share on other sites

It's kinda confusing, but you need to also call AddPlayerActData with the newly created act, but since PlayerBackground:AddAct returns the player background rather than the act(so the devs can chain add acts), you have to access the newly created act using background.acts[act_id]

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.