using dc in the lua file for readdatafile...complications
Posted: Sat Aug 06, 2005 8:32 pm
My previous attempts at maps (using the origianl zeroeditor -not bf pro)...have been made without the dc script...the units worked ok....now i tried to use the dc part...i've copied all the odf, msh, files into their respective folders...and the req files also, however i'm not too sure where to put them, so i left them at the menu where you cna pick to go into the odf or msh...etc...folders...
something is wrong as when i try to load my level (after cleaning, munging, and putting my mod folder into the addon folder for the game...
any ideas?...here is the beginning part of my lua...
thanks in advance
>>>>>>>>>>here is the lua<<<<<<<<
---------------------------------------------------------------------------
-- FUNCTION: ScriptInit
-- PURPOSE: This function is only run once
-- INPUT:
-- OUTPUT:
-- NOTES: The name, 'ScriptInit' is a chosen convention, and each
-- mission script must contain a version of this function, as
-- it is called from C to start the mission.
---------------------------------------------------------------------------
function ScriptInit()
-- Empire Attacking (attacker is always #1)
local REP = 2
local CIS = 1
-- These variables do not change
local ATT = 1
local DEF = 2
AddMissionObjective(CIS, "red", "level.try2.objectives.1");
AddMissionObjective(CIS, "orange", "level.try2.objectives.2");
AddMissionObjective(CIS, "orange", "level.try2.objectives.3");
AddMissionObjective(REP, "red", "level.try2.objectives.1");
AddMissionObjective(REP, "orange", "level.try2.objectives.2");
AddMissionObjective(REP, "orange", "level.try2.objectives.3");
ReadDataFile("sound\\tat.lvl;tat1cw")
ReadDataFile("dc:SIDE\\rep.lvl",
-- "rep_inf_basic",
"rep_inf_clone_trooper",
-- "rep_inf_clone_pilot",
-- "rep_inf_clone_sharpshooter",
"rep_inf_macewindu",
"rep_inf_jet_trooper");
ReadDataFile("dc:SIDE\\cis.lvl",
"cis_inf_battledroid",
-- "cis_inf_battledroid_inf",
-- "cis_inf_battledroid_av",
-- "cis_inf_battledroid_sniper",
-- "cis_inf_assault",
"cis_inf_countdooku",
"cis_inf_droideka");
SetAttackingTeam(ATT);
-- Republic Stats
SetTeamName(REP, "Republic")
SetTeamIcon(REP, "rep_icon")
AddUnitClass(REP, "rep_inf_clone_trooper",16)
-- AddUnitClass(REP, "rep_inf_jedimale",1)
-- AddUnitClass(REP, "rep_inf_clone_pilot",3)
-- AddUnitClass(REP, "rep_inf_clone_sharpshooter",2)
-- AddUnitClass(REP, "rep_inf_clone_commander",1)
SetHeroClass(REP, "rep_inf_macewindu")
-- CIS Stats
SetTeamName(CIS, "CIS")
SetTeamIcon(CIS, "cis_icon")
-- AddUnitClass(CIS, "geo_inf_geonosian",5)
AddUnitClass(CIS, "cis_inf_battledroid",15)
-- AddUnitClass(CIS, "cis_inf_battledroid_av",2)
-- AddUnitClass(CIS, "cis_inf_battledroid_sniper",2)
AddUnitClass(CIS, "cis_inf_droideka",1)
SetHeroClass(CIS, "cis_inf_countdooku")
-- Attacker Stats
SetUnitCount(ATT, 70)
SetReinforcementCount(ATT, 200)
-- AddBleedThreshold(ATT, 31, 0.0)
-- AddBleedThreshold(ATT, 21, 0.75)
AddBleedThreshold(ATT, 11, 0.75)
AddBleedThreshold(ATT, 10, 1.5)
AddBleedThreshold(ATT, 1, 3.0)
-- Defender Stats
SetUnitCount(DEF, 70)
SetReinforcementCount(DEF, 200)
-- AddBleedThreshold(DEF, 31, 0.0)
-- AddBleedThreshold(DEF, 21, 0.75)
AddBleedThreshold(DEF, 11, 0.75)
AddBleedThreshold(DEF, 10, 1.5)
AddBleedThreshold(DEF, 1, 3.0)
-- Local Stats
-- SetTeamName(3, "locals")
-- AddUnitClass(3, "gam_inf_gamorreanguard",3)
-- SetUnitCount(3, 3)
-- SetTeamAsEnemy(3, ATT)
-- SetTeamAsEnemy(3, DEF)
-- Level Stats
ClearWalkers()
AddWalkerType(0, 4) -- Droidekas
AddWalkerType(1, 4) -- number of leg pairs, count
AddWalkerType(2, 0)
-- SetMemoryPoolSize("EntityHover", 12)
-- SetMemoryPoolSize("EntityFlyer", 5)
-- SetMemoryPoolSize("EntityBuildingArmedDynamic", 16)
-- SetMemoryPoolSize("EntityTauntaun", 0)
-- SetMemoryPoolSize("MountedTurret", 22)
-- SetMemoryPoolSize("SoundSpaceRegion", 81)
SetMemoryPoolSize("PowerupItem", 60)
SetMemoryPoolSize("EntityMine", 40)
SetMemoryPoolSize("Aimer", 200)
SetMemoryPoolSize("Obstacle", 725)
SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:try2\\try2.lvl")
SetDenseEnvironment("true")
--AddDeathRegion("Sarlac01")
--SetMaxFlyHeight(90)
--SetMaxPlayerFlyHeight(90)
something is wrong as when i try to load my level (after cleaning, munging, and putting my mod folder into the addon folder for the game...
any ideas?...here is the beginning part of my lua...
thanks in advance
>>>>>>>>>>here is the lua<<<<<<<<
---------------------------------------------------------------------------
-- FUNCTION: ScriptInit
-- PURPOSE: This function is only run once
-- INPUT:
-- OUTPUT:
-- NOTES: The name, 'ScriptInit' is a chosen convention, and each
-- mission script must contain a version of this function, as
-- it is called from C to start the mission.
---------------------------------------------------------------------------
function ScriptInit()
-- Empire Attacking (attacker is always #1)
local REP = 2
local CIS = 1
-- These variables do not change
local ATT = 1
local DEF = 2
AddMissionObjective(CIS, "red", "level.try2.objectives.1");
AddMissionObjective(CIS, "orange", "level.try2.objectives.2");
AddMissionObjective(CIS, "orange", "level.try2.objectives.3");
AddMissionObjective(REP, "red", "level.try2.objectives.1");
AddMissionObjective(REP, "orange", "level.try2.objectives.2");
AddMissionObjective(REP, "orange", "level.try2.objectives.3");
ReadDataFile("sound\\tat.lvl;tat1cw")
ReadDataFile("dc:SIDE\\rep.lvl",
-- "rep_inf_basic",
"rep_inf_clone_trooper",
-- "rep_inf_clone_pilot",
-- "rep_inf_clone_sharpshooter",
"rep_inf_macewindu",
"rep_inf_jet_trooper");
ReadDataFile("dc:SIDE\\cis.lvl",
"cis_inf_battledroid",
-- "cis_inf_battledroid_inf",
-- "cis_inf_battledroid_av",
-- "cis_inf_battledroid_sniper",
-- "cis_inf_assault",
"cis_inf_countdooku",
"cis_inf_droideka");
SetAttackingTeam(ATT);
-- Republic Stats
SetTeamName(REP, "Republic")
SetTeamIcon(REP, "rep_icon")
AddUnitClass(REP, "rep_inf_clone_trooper",16)
-- AddUnitClass(REP, "rep_inf_jedimale",1)
-- AddUnitClass(REP, "rep_inf_clone_pilot",3)
-- AddUnitClass(REP, "rep_inf_clone_sharpshooter",2)
-- AddUnitClass(REP, "rep_inf_clone_commander",1)
SetHeroClass(REP, "rep_inf_macewindu")
-- CIS Stats
SetTeamName(CIS, "CIS")
SetTeamIcon(CIS, "cis_icon")
-- AddUnitClass(CIS, "geo_inf_geonosian",5)
AddUnitClass(CIS, "cis_inf_battledroid",15)
-- AddUnitClass(CIS, "cis_inf_battledroid_av",2)
-- AddUnitClass(CIS, "cis_inf_battledroid_sniper",2)
AddUnitClass(CIS, "cis_inf_droideka",1)
SetHeroClass(CIS, "cis_inf_countdooku")
-- Attacker Stats
SetUnitCount(ATT, 70)
SetReinforcementCount(ATT, 200)
-- AddBleedThreshold(ATT, 31, 0.0)
-- AddBleedThreshold(ATT, 21, 0.75)
AddBleedThreshold(ATT, 11, 0.75)
AddBleedThreshold(ATT, 10, 1.5)
AddBleedThreshold(ATT, 1, 3.0)
-- Defender Stats
SetUnitCount(DEF, 70)
SetReinforcementCount(DEF, 200)
-- AddBleedThreshold(DEF, 31, 0.0)
-- AddBleedThreshold(DEF, 21, 0.75)
AddBleedThreshold(DEF, 11, 0.75)
AddBleedThreshold(DEF, 10, 1.5)
AddBleedThreshold(DEF, 1, 3.0)
-- Local Stats
-- SetTeamName(3, "locals")
-- AddUnitClass(3, "gam_inf_gamorreanguard",3)
-- SetUnitCount(3, 3)
-- SetTeamAsEnemy(3, ATT)
-- SetTeamAsEnemy(3, DEF)
-- Level Stats
ClearWalkers()
AddWalkerType(0, 4) -- Droidekas
AddWalkerType(1, 4) -- number of leg pairs, count
AddWalkerType(2, 0)
-- SetMemoryPoolSize("EntityHover", 12)
-- SetMemoryPoolSize("EntityFlyer", 5)
-- SetMemoryPoolSize("EntityBuildingArmedDynamic", 16)
-- SetMemoryPoolSize("EntityTauntaun", 0)
-- SetMemoryPoolSize("MountedTurret", 22)
-- SetMemoryPoolSize("SoundSpaceRegion", 81)
SetMemoryPoolSize("PowerupItem", 60)
SetMemoryPoolSize("EntityMine", 40)
SetMemoryPoolSize("Aimer", 200)
SetMemoryPoolSize("Obstacle", 725)
SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:try2\\try2.lvl")
SetDenseEnvironment("true")
--AddDeathRegion("Sarlac01")
--SetMaxFlyHeight(90)
--SetMaxPlayerFlyHeight(90)