Just create a vehicle set like you normally would:
CODE
struct VehicleInfo VehicleSet[]=
{
{ 32,126, mapLynx, mapMicrowave, North},
{ 34,126, mapLynx, mapMicrowave, North},
{ 32,124, mapLynx, mapMicrowave, North},
{ 34,124, mapLynx, mapMicrowave, North}
};
Then insert them into the base set:
CODE
struct BaseInfo Base1= { 0,0, 0,0, 0,0, autosize(VehicleSet) };
Now, as you can see, i left the spots for buildings, walls and tubes empty (all 0's), and when used with CreateBase(0,31,-1,base1); it creates the units where you want them.
#ifndef BASEDATA_H
#define BASEDATA_H
#include <OP2Helper.h>
#include <BaseBuilder.h>
#define numof(array) (sizeof(array)/sizeof(array[0]))
#define autosize(array) numof(array), array
struct BeaconInfo beaconSet1[] =
{ { 10, 17, mapMiningBeacon, 1, 0, -1},
{ 5, 17, mapMiningBeacon, 1, 0, -1},
{ -5, 17, mapMiningBeacon, 0, 0, -1},
{ 0, 17, mapMiningBeacon, 0, 0, -1},
{ 15, 17, mapFumarole, -1, -1, -1},
{ 20, 17, mapFumarole, -1, -1, -1},
};
struct BuildingInfo buildingSet1[] =
{
{ 0, 0, mapCommandCenter},
{ 7, 7, mapStructureFactory},
{ 7, -7, mapCommonOreSmelter},
{-7, -7, mapTokamak},
{-7, 7, mapStandardLab},
{-7, 0, mapAgridome}
};
struct TubeWallInfo tubeSet1[] =
{
{ 3, 0, 7, -4}, // Command Center to Smelter
{ 7, 1, 7, 5}, // Command Center to Smelter joint to Structure Factory
{-2, 0, -4, 0}, // Command Center to Agridome
{-7, 2, -7, 5} // Agridome to Standard Lab
};
struct VehicleInfo unitSet1[] =
{
{ 4, 10, mapConVec, mapNone, 3},
{ 7, 10, mapConVec, mapNone, 1},
{ 10, -6, mapCargoTruck, mapNone, 0},
{ 10, -4, mapCargoTruck, mapNone, 1},
{ 8, -4, mapCargoTruck, mapNone, 2},
{ 12, -6, mapRoboSurveyor, mapNone, 7},
{ 12, -4, mapRoboMiner, mapNone, 7},
{ 3, 1, mapEarthworker, mapNone, 1},
{ 3, -1, mapRoboDozer, mapNone, 7}
};
struct BaseInfo base[] =
{
{ autosize(beaconSet1), autosize(buildingSet1), autosize(tubeSet1), 0, 0, autosize(unitSet1) },
};
struct StartLocation startLocation[] =
{
{ 49, 14, &base[0]},
};
#endif
struct VehicleInfo unitSet1[] =
{
{ 4, 10, mapConVec, mapCommandCenter, 3},
{ 7, 10, mapConVec, mapStructureFactory, 1},
// etc. Add more ConVecs here with corersponding cargo
{ 10, -6, mapCargoTruck, mapNone, 0},
{ 10, -4, mapCargoTruck, mapNone, 1},
{ 8, -4, mapCargoTruck, mapNone, 2},
{ 12, -6, mapRoboSurveyor, mapNone, 7},
{ 12, -4, mapRoboMiner, mapNone, 7},
{ 3, 1, mapEarthworker, mapNone, 1},
{ 3, -1, mapRoboDozer, mapNone, 7}
};
struct BaseInfo base[] =
{
// Remove unwanted base/tube/wall arrays from the base layout
{ autosize(beaconSet1), 0, 0, 0,0, 0, 0, autosize(unitSet1) },
};
struct VehicleInfo
{
int x;
int y;
enum map_id type;
enum map_id weaponCargo;
int dir;
};
Do NOT use the weaponCargo setting with trucks
it's good to have a new coder with us, but please READ the op2helper file (as well as the other "SDK" files)
below is a copy of part of the OP2helper.h file:
Keep working on it, and you'll be making better DLLs in a few weeks/months time.
There aren't any instructions in the current SDK as to how to spawn AI attacks like that. But there is the definition of the functions to do it. You either have to figure out how to use them yourself, or look through the posts on here to figure out what people have done. The pinned DLL Programming thread has a lot of useful info on AI related stuff if I remember correctly. Sounds like you want to look into stuff relating to Groups and PinWheel.
Passworded room? Err, I mean, passworded room?
J/k, I'm really not sure what you're talking about.
Of course there is really nothing that goes on in there anymore. It's been dead for forever. Certainly not much useful was ever put in there, at least not in terms of making levels. Mostly just ideas that never got off the ground. (Hence why nobody needs to know about them and get their hopes up )