[newtozentax][scriptnoob] Q: Name this scripting language?
Posted: Mon Dec 21, 2015 4:45 pm
hello. i would like to know what scripting language this code is. i could guess but in doing so i could make a big fool of myself. so ill make a guess anyways: is it c++ ? idk. can you name this scripting language so i can study and figure it out? i jus need that name so i know what to start studying with. thanks for any comment helps alot.thanks.
random snipit of code :
so what is the scripting language?
random snipit of code :
Code: Select all
#include "scripts/bosses/hummer.txt"
#include "scripts/bosses/longhunter.txt"
#include "scripts/bosses/mantis.txt"
#include "scripts/bosses/trex.txt"
#include "scripts/bosses/campainger.txt"
/*
==============================================================
VarFunctor
==============================================================
*/
funcdef void VARFUNC(const kStr &in, const kStr &in);
class VarFunctor
{
void Add(const kStr &in gameVar, const kStr &in value)
{
GameVariables.Add(gameVar, value);
}
void SetValue(const kStr &in gameVar, const kStr &in value)
{
GameVariables.SetValue(gameVar, value);
}
};
/*
==============================================================
InitHummer1StateVars
==============================================================
*/
void InitHummer1StateVars(VARFUNC @setFunc)
{
setFunc("hummer1State", "0");
setFunc("hummer1Health", "0");
setFunc("hummer1Sector", "-1");
setFunc("hummer1Origin", "0.0 0.0 0.0");
setFunc("hummer1Yaw", "0.0");
}
/*
==============================================================
InitHummer2StateVars
==============================================================
*/
void InitHummer2StateVars(VARFUNC @setFunc)
{
setFunc("hummer2State", "0");
setFunc("hummer2Health", "0");
setFunc("hummer2Sector", "-1");
setFunc("hummer2Origin", "0.0 0.0 0.0");
setFunc("hummer2Yaw", "0.0");
}
/*
==============================================================
InitLongHunterStateVars
==============================================================
*/
void InitLongHunterStateVars(VARFUNC @setFunc)
{
setFunc("longHunterState", "0");
setFunc("longHunterHealth", "0");
setFunc("longHunterSector", "-1");
setFunc("longHunterOrigin", "0.0 0.0 0.0");
setFunc("longHunterYaw", "0.0");
setFunc("longHunterObservationPoint", "0");
}
/*
//// and then this is some more random code from further down in the script:
void main(void)
{
kStr szShowIntros;
//
// add game variables at startup
//
// variables which are once-only should be added here
GameVariables.Add("bStartedIntro", "0");
// everything else, including anything that ought to be
// reinitialized when a new game starts, should be added
// in here.
VarFunctor functor;
SetStateVars(VARFUNC(functor.Add));
// config startmap and trainingmap variables
// note: these are created by the engine during initialization
GameVariables.SetValue("g_startmap", "levels/level05.map");
GameVariables.SetValue("g_restartmap", "levels/level42.map");
GameVariables.SetValue("g_trainingmap", "levels/level47.map");
GameVariables.SetValue("g_creditsmap", "levels/level02.map");
GameVariables.SetValue("g_hubmapid", "5");
GameVariables.SetValue("g_hubwarptid", "10666");
// show intro cinematics?
if(Sys.GetCvarValue("g_showgameintros", szShowIntros))
{
if(szShowIntros.Atoi() == 0)
{
// skip directly to title
Game.ChangeMap("levels/level42.map");
return;
}
}
Game.ChangeMap("levels/level45.map");
}
so what is the scripting language?