Outpost Universe Forums

Projects & Development => Outpost 2 Programming & Development => Topic started by: Sirbomber on October 30, 2005, 02:30:37 PM

Title: Lr Game
Post by: Sirbomber on October 30, 2005, 02:30:37 PM
How would I make a land rush game setup under BaseData.h (basically I want it to start with just vecs)? Everything I tried doesn't work/won't compile or crashes the game.
Title: Lr Game
Post by: Eddy-B on October 30, 2005, 03:42:00 PM
Just create a vehicle set like you normally would:
Code: [Select]
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: [Select]
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.
Title: Lr Game
Post by: Hooman on October 30, 2005, 04:27:52 PM
Yeah, unit setup can be done just like Eddy-B said. Then all you need is to setup appropriate victory/failure conditions. Basically what the usual levels do is have some basic landrush type victory/failure triggers until all players have placed their CCs down. Then it replaces the old conditions with normal last one standing type victory conditions. I believe ZigZagJoe can fill you in on the details.
 
Title: Lr Game
Post by: HaXtOr on October 30, 2005, 08:42:44 PM
I have a Land Rush template that i made and never told anyone about... I wonder where I put it lol


 
Title: Lr Game
Post by: Eddy-B on October 31, 2005, 02:27:58 AM
Quote
I wonder where I put it lol
you can put here -->
:P
Title: Lr Game
Post by: Hooman on October 31, 2005, 02:47:41 AM
Lol, yes. That would be helpful.

I suspect you use CreateOperationalTrigger for checking on the CCs. Also, use CreateResourceTrigger and CreateVehicleCountTrigger to check for failure conditions. If any of these fire, then enable a LoS condition. If they've deployed their CC (CreateOperationalTrigger) then game continues for them in LoS mode. If they run out of resources or vehicles, then when you enable LoS for them, they will lose and be removed from the game. So basically, any of those three conditions could enable LoS.

To setup LoS, you CreateOnePlayerLeftTrigger. You can either create this trigger when one of the other triggers fires, or you can create it but leave it disabled until one of the others fires. I believe the standard DLLs create this trigger but leave it disabled until one of the above triggers fires.

Hope that helps.
 
Title: Lr Game
Post by: HaXtOr on November 02, 2005, 12:00:04 AM
Should i realese the code as a land rush template? if do im goign to make it look more clean
Title: Lr Game
Post by: Leviathan on November 02, 2005, 03:07:21 AM
that would be great moogle, joe has also done a LR map.
Title: Lr Game
Post by: Hooman on November 02, 2005, 11:10:17 AM
Post the relevant section of code here. Just the stuff for setting up the triggers for victory and failure. That would be useful to have around. If it's well written, we'll consider adding it to the SDK. (Maybe as a project template, or maybe as helper functions to setup the conditions for you. Probably the later since it's more consistent with how LoS victory conditions are setup.)