Anybody around with experience in LUA?
I'd like to replace the game script file "MeetTownDefault.script" with an equivalent LUA file "MeetTownDefault.lua" (as practice, with the eventual aim of replacing all script files with lua script files). It's hard going, though, so I could do with help to get started. I've attached the GameScript version as an image and here's the code that calls it:
string message = "You go out searching around town for any new girls, ";
message += "and you notice a potential new girl and walk up to her.";
g_MessageQue.AddToQue(message, 2);
int v[2] = {0,-1};
cTrigger* trig = 0;
DirPath dp;
string filename;
cScriptManager sm;
/*
* is there a girl specific talk script?
*/
if(!(trig = girl->m_Triggers.CheckForScript(TRIGGER_MEET, false, v))) {
// no, so trigger the default one
dp = DirPath()
<< "Resources" << "Scripts" << "MeetTownDefault.script"
;
}
else {
// trigger the girl-specific one
dp = DirPath()
<< "Resources" << "Characters" << girl->m_Name
<< trig->m_Script
;
}
eventrunning = true;
sm.Load(dp, girl);