Can Custom FC Commands use ReadDataFile?
Posted: Tue Oct 28, 2014 3:33 am
I have 1.3 r129 installed and have learned how to make custom buttons with commands on Fake Console list from the help of Zerted.
I'm using the asset scripts to munge a new mission.lvl similar to the retail file.
On each stock mission I have the ability to toss in FC commands, then when I munge, I just copy the new mission.lvl into gamedata\data\_lvl_pc and replace.
Then when I begin the game my commands are there and have already made plenty of stuff work.
Then I'd say not more than 30 minutes later, I had this idea:
On the script for tat2g_eli (Mos Eisley Assault) I decided to try to call in a character while running the game.
The first button I titled "Call Lord Vader" which would run this command:
ReadDataFile("SIDE\\rep.lvl", "rep_hero_cloakedanakin")
While in-game I would click "Call Lord Vader"
Then I would click the 2nd button titled "Assign Lord Vader" with this command
AddUnitClass(IMP, "rep_hero_cloakedanakin")
How ever the game just crashed when I click the command Call Lord Vader, not giving me a chance to "Assign Lord Vader" to a team.
My question is, if possible, how may I call in new characters with FC commands and assign them to a team.
Lua setup:
And here is bf2log: (long log, here is important bit)
I'm using the asset scripts to munge a new mission.lvl similar to the retail file.
On each stock mission I have the ability to toss in FC commands, then when I munge, I just copy the new mission.lvl into gamedata\data\_lvl_pc and replace.
Then when I begin the game my commands are there and have already made plenty of stuff work.
Then I'd say not more than 30 minutes later, I had this idea:
On the script for tat2g_eli (Mos Eisley Assault) I decided to try to call in a character while running the game.
The first button I titled "Call Lord Vader" which would run this command:
ReadDataFile("SIDE\\rep.lvl", "rep_hero_cloakedanakin")
While in-game I would click "Call Lord Vader"
Then I would click the 2nd button titled "Assign Lord Vader" with this command
AddUnitClass(IMP, "rep_hero_cloakedanakin")
How ever the game just crashed when I click the command Call Lord Vader, not giving me a chance to "Assign Lord Vader" to a team.
My question is, if possible, how may I call in new characters with FC commands and assign them to a team.
Lua setup:
Hidden/Spoiler:
Hidden/Spoiler: