Author Topic: Lr Game  (Read 2518 times)

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Lr Game
« 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.
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline Eddy-B

  • Hero Member
  • *****
  • Posts: 1186
    • http://www.eddy-b.com
Lr Game
« Reply #1 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.
« Last Edit: October 30, 2005, 03:43:30 PM by Eddy-B »
Rule #1:  Eddy is always right
Rule #2: If you think he's wrong, see rule #1
--------------------

Outpost : Renegades - Eddy-B.com - Electronics Pit[/siz

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Lr Game
« Reply #2 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.
 

Offline HaXtOr

  • Sr. Member
  • ****
  • Posts: 423
    • http://www.wtfmoogle.com
Lr Game
« Reply #3 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


 

Offline Eddy-B

  • Hero Member
  • *****
  • Posts: 1186
    • http://www.eddy-b.com
Lr Game
« Reply #4 on: October 31, 2005, 02:27:58 AM »
Quote
I wonder where I put it lol
you can put here -->
:P
Rule #1:  Eddy is always right
Rule #2: If you think he's wrong, see rule #1
--------------------

Outpost : Renegades - Eddy-B.com - Electronics Pit[/siz

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Lr Game
« Reply #5 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.
 

Offline HaXtOr

  • Sr. Member
  • ****
  • Posts: 423
    • http://www.wtfmoogle.com
Lr Game
« Reply #6 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

Offline Leviathan

  • Hero Member
  • *****
  • Posts: 4055
Lr Game
« Reply #7 on: November 02, 2005, 03:07:21 AM »
that would be great moogle, joe has also done a LR map.

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Lr Game
« Reply #8 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.)