Re: How can i change into another mod spawn
god froggy wrote:
This thread does smell of fail after all!
Yes, posting when you don't know what he's talking about is pretty fail-y.
Original poster, what you're looking for is help in changing the activities for the game modes. In each game mode (the .lua files are in Base.rte\Scenes\Script), there will be code to spawn actors and craft. In the SkirmishDefense.lua script, it's near the bottom, it looks like this:
Code:
local actor = {};
for x = 0, math.ceil(math.random(3)) do
local y = math.random();
if y > 0.05 then
actor[x] = CreateAHuman(self.AList[math.random(#self.AList)]);
actor[x].Team = self.CPUTeam;
actor[x].AIMode = Actor.AIMODE_BRAINHUNT;
actor[x]:AddInventoryItem(CreateHDFirearm(self.WList[math.random(#self.WList)]));
actor[x]:AddInventoryItem(CreateHDFirearm("Medium Digger"));
else
actor[x] = CreateACrab("Dreadnought");
actor[x].Team = self.CPUTeam;
actor[x].AIMode = Actor.AIMODE_BRAINHUNT;
end
end
Now this references two lists, named WList and AList. Those are near the top, and contain the names of everything it can spawn. They look like this (cut off for readability:
Code:
self.WList = { "Grenade Launcher", "Blaster", [...]
self.AList = { "Mia", "Dafred", "Dimitri", [...]
All you have to do to add things (or at least I think so, I have not done it in this version of Cortex Command) is to insert their PresetNames into the respective lists; devices go into the WList, guns and the like, and actors go into the AList, bodies.
This may not apply to the other scripts, you'll have to search for code similar to what's in SkirmishDefence and reverse engineer it a little to find out where it has a list of spawnables.