pascal76680
(Pascal.A - Phoenix Interactive)
#1
Hi.
Need to make function can delete file generated by mission on my campaign. Is to force the game to use only the startingplayerfleet.lua (because actually, even if i force script to use this startingplayerfleet.lua, the game detect presence of persist.lua and use it, even if
, my .campaign sayās āDonāt use default persistā).
Or function actually exists in the game to say at the end of one mission, āDonāt create this fu***ng persist file !ā ā¦
Any idea ?
Yeah, iām little crazy about that ⦠But itās really important ^^.
pascal76680
(Pascal.A - Phoenix Interactive)
#2
No Idea ?
So hereās my real problem :
In .campaign, I tried all of these situations :
Mission[4] =
{
directory = "Mission_Demo_03",
level = "Mission_Demo_03.level",
displayName = "$60210",
description = "$60211",
postlevel = function () postLevelComplete() end,
usepersist = "data:leveldata//campaign//Demo_SSC//Mission_Demo_03//startingplayerfleet.lua",
usedefaultpersist = 0,
}
With usedefaultpersist = 1, or without this specification⦠The game uses (for strange reasons) the previous persist4.lua file generated in the previous missionā¦And yes, it doesnāt work even if I tell the game āDonāt use this, use only the following startingplayerfleet.luaā.
@BitVenom ?
Hm. Possible workaround⦠have a mission between the two, that just removes all the ships from the playerās fleet and ends in victory? Thatās the best I can come up with right now
pascal76680
(Pascal.A - Phoenix Interactive)
#4
Nope ⦠i actually try this.
The next mission load the previous persist, and if i make level without ship, at the end, game save persist without nothing, the next mission load this persist, (because this files exists), and return error at begin, the mission is ended at first frame. (Because, no ship in this persist).
Only way is to delete this file, or to use other way in the previous mission.
But itās not my objective ^^.
GBX add this value āusepersit = ā¦,ā and usedefaultpersist = 1 or 0, but the game ignore this if the persist.lua exist in the player profile folder.
506933395
(Liuruoyang1995=Lone Wolf Akela)
#5
The persist data is read by the function SobGroup_LoadPersistantData() in your mission lua.
You can simply remove that function and use function like addSquadron() in your mission level file to add ships you want to the player.
pascal76680
(Pascal.A - Phoenix Interactive)
#6
I know, but, in this case, if i add by addSquadron, the ship doesnāt appeared ⦠[Can be selected but itās ācloakedā without cloak], because of my ship, use madstate when it built, via addSquadron, this MadState doesnāt launch, and if i launch this madstate, the ship doesnāt appeared ā¦
And i need to use SobGroup_PersistantData function because, my ship work in this caseā¦
But i found way to have the ship in the next mission, in the previous mission, a switch owner all ship i donāt use for next mission, the persist save only the ship of the first player, so itās work.