| Author | Topic: why this script don't run? (Read 985 times) |
leclerc New Member
 member is offline
Joined: Nov 2004 Posts: 11
|  | why this script don't run? « Thread Started on May 31, 2006, 5:16am » | |
hi, a friend from me, have make a campaign mission for kurks, but if are run the mission, are can play it the first mission, but the second, not done why?
here i send you the script!
function EnterChapter( strChapterName )
EnableMission("scenarios\\scenariomissions\\german\\Kotabahru\\1");
AddNewSlot ( "jap_tankette1" ); AddNewSlot ( "chiha" ); AddNewSlot ( "jap_pak1"); end;
function MissionFinished( strMissionName ) local bScenario = GetIGlobalVar("Mission.scenarios\\scenariomissions\\german\\Kotabahru\\1.Finished", 0);
if ( strMissionName == "scenarios\scenariomissions\german\Kotabahru\1") then EnableMission("scenarios\\scenariomissions\\german\\Aeroport\\1"); end;
if ( strMissionName == "scenarios\scenariomissions\german\Aeroport\1") then EnableMission("scenarios\\scenariomissions\\german\\Kualalumpur\\1");
AddBaseUpgrade("chiha2"); end;
if ( strMissionName == "scenarios\scenariomissions\german\Kualalumpur\1") then EnableChapter("scenarios\\chapters\\german\\Singapour\\1");
FinishChapter();
end;
end;
function PlayerGainLevel( iLevel ) if ( iLevel == 2) then end;
if ( iLevel == 1) then end; end;
| |
|
Adrian Taylor Administrator
     member is offline
Joined: Mar 2004 Gender: Male  Posts: 1,930
|  | Re: why this script don't run? « Reply #1 on Jun 5, 2006, 8:29am » | |
I Leclerc,
Sorry for not responding sooner to your query on Chapter scripting. These are the most notorious script files to get to work. I have spent many hours pulling my hair out with these script files as there can be many variables that you have to consider.
Firstly have you tried getting the "Aeroport" mission to run first. If it does then that points to a script file problem. If it doesn't it means there is something wrong elsewhere.
Have you made sure that the Chapter xml file is correct. Also there may be a problem with you map files. All these need checking and cross-referencing.
Adrian
| |
|
leclerc New Member
 member is offline
Joined: Nov 2004 Posts: 11
|  | Re: why this script don't run? « Reply #2 on Jun 7, 2006, 8:06pm » | |
ok adrian, after i have ask the mapper over it structure, i would just ask another question!
if i look original campagne structure from bk!
data.pak\Scenarios\Chapters\allies
so as i have remark that it exist different files,
1.xml context.xml head.txt script.lua description.txt
are this identical file in mission kursk chapter? or as this in different directory?
| |
| |
|