Jump to content

Map with WF but without Harvester


Henk

Recommended Posts

Hi,

I was wondering if it's possible to not make the Harvester spawn at all. I'm making a map without a Refinery, but because I have an Airstrip and Weapons Factory, they spawn there.

Is there any way to prevent it from being built in the beginning of the game? Or should I make them drive off to a part outside of the game area and have them just sit there? And do Harvesters die if they haven't moved for an x amount of time? because I think they do..

I've read these topics:

http://renegade-x.com/forums/viewtopic.php?f=135&t=75008

https://renegade-x.com/forums/viewtopic.php?f=136&t=75201

But both those topics are about a situation without a WF or Airstrip..

Link to comment
Share on other sites

  • Totem Arts Staff

Crnyo:

If so try to access VehicleManager in Rx_Game and set bNodRefDestroyed and bGDIRefDestroyed to true.

If you are using a mutator you could try putting this in your postbeginplay()

CODE: SELECT ALL

RxGame(WorldInfo.Game).VehicleManager.bNodRefDestroyed = true;

RxGame(WorldInfo.Game).VehicleManager.bGDIRefDestroyed = true;

Whenever harvester gets destroyed game will check whether *RefDestroyed is set to true. If it is then harvester spawning will be aborted.

Maby this?

Link to comment
Share on other sites

@ above, that should work. When using a mutator, you will have to use it for a map-specific only. If we load up a mutator like that for every map (which is default) no harvester will ever spawn!??

So, I'd suggest setting the world setting within kismet somehow,

RxGame(WorldInfo.Game).VehicleManager.bNodRefDestroyed = true;

RxGame(WorldInfo.Game).VehicleManager.bGDIRefDestroyed = true;

I tried something (and several other variants which I didnt make screenshots of) which failed..

Maybe you have better luck!

a7f26927b4887da5c19cf84bd3a75fec.png

Link to comment
Share on other sites

Just found out that the thing I postd will never work.

The class you're looking for is Rx_VehicleManager, this is where the magic happens.

The piece of code that tells to spawn initial harvesters is as following:

function SpawnInitialHarvesters()
{
 	QueueHarvester(TEAM_GDI,false);
 	QueueHarvester(TEAM_NOD,false);
}

There is no bool built in this piece of code, so there is no way of disabling the initial spawned harvesters though this specific piece of code.

If we look at the function QueueHarvester maybe we can learn something from it:

function QueueHarvester(byte team, bool bWithIncreasedDelay)
{
local VQueueElement NewQueueElement;
NewQueueElement.Buyer = None;

   if(team == TEAM_NOD) 
   {
   	if(bNodRefDestroyed)
   		return;
   	NewQueueElement.VehClass  = class'Rx_Vehicle_Harvester_Nod';
	NewQueueElement.VehicleID = 8;
    NOD_Queue.AddItem(NewQueueElement);
    if (!IsTimerActive('queueWork_NOD'))
    {
       if(bWithIncreasedDelay)
       {
       	 SetTimer(ProductionDelay + 10.0, false, 'queueWork_NOD');
       	 if(!AirStrip.IsDestroyed())
       	 	SetTimer(10.0,false,'SpawnC130');
      	   }
       else
       {
       	 if(AirStrip.IsDestroyed())
       	 	SpawnC130();
       	 SetTimer(ProductionDelay, false, 'queueWork_NOD'); 
       }
    }
} 
else if(team == TEAM_GDI) 
{
   	if(bGDIRefDestroyed)
   		return;
    NewQueueElement.VehClass  = class'Rx_Vehicle_Harvester_GDI';
	NewQueueElement.VehicleID = 7;
    GDI_Queue.AddItem(NewQueueElement);
    if (!IsTimerActive('queueWork_GDI'))
    {	       
       if(bWithIncreasedDelay)
       {
       	 SetTimer(ProductionDelay + 10.0 + GDIAdditionalAirdropProductionDelay, false, 'queueWork_GDI');
      	   }
       else
       {
       	 SetTimer(ProductionDelay + GDIAdditionalAirdropProductionDelay, false, 'queueWork_GDI'); 
       }	       
    }		
}		
}

Here we see that it checks for: if(bNodRefDestroyed) return; before executing code, I think this is the way to play with the first piece of code that tells the harvesters to spawn.

Maybe, for future purposes RypeL can build-in a bool variable that allows us mappers to change, so we can deny initialharvesterspawn ??

I'm looking into getting that bool (bNodRefDestroyed) to work for us. Will post back later.

Edit:

Nope, could not find a way to do this. We have no tools built in this piece of code, it's hard coded all the way.

One way to possibly fix this, is to write a mutator which we can toggle via kismet. That mutator then has to override the rx_vehiclemanager's bool: bNodRefDestroyed and bGDIRefDestroyed. Since mutators are always loaded on a server, we do not need to change the settings by default, only when overrided by kismet (in other words, when we want it to)

Maybe our mutator expert Yosh56 can look into this? I don't have time at the moment, else I could've tried it.. I hope you can do something with this.

Link to comment
Share on other sites

Hm... maybe what you could try is to place a volume at wf and as and create a kismet touch event for it. Then you could make that check for harvesters touching it. Then you should have a reference to the harvester in kismet and could then destroy it by inflicting damage through it or, maybe better, could set it to hidden, set collision to off and freeze it's controller. So it would be invisible, non collide and wouldn't move. ..... or just wait for a map property to be introduced in a future patch. I'll pass it on or maybe work on it myself.

Link to comment
Share on other sites

  • 2 weeks later...

I can't get the Harvester to trigger the touch event. I have made a touch event with vehicles before and that worked (repairpad on Reservoir), but it doesn't do anything.. It DOES work on myself..

Other Kismet problem: If anyone knows how to either:

1. make the silo give more credits per second

2. give all players on the team 1 or 2 credits per second (If silo is captured, besides the 0.5 credits per second)

or:

3. Activate 2 hidden silo's in the background when the Silo in the base is captured.

Please let me know if there is a solution for this, or if there will be one in the future. Because the problem I have now is that 1 silo just doesn't give enough credits if you don't have a ref, and that's kinda boring i.m.o.

Link to comment
Share on other sites

I can't get the Harvester to trigger the touch event. I have made a touch event with vehicles before and that worked (repairpad on Reservoir), but it doesn't do anything.. It DOES work on myself..

Other Kismet problem: If anyone knows how to either:

1. make the silo give more credits per second

2. give all players on the team 1 or 2 credits per second (If silo is captured, besides the 0.5 credits per second)

or:

3. Activate 2 hidden silo's in the background when the Silo in the base is captured.

Please let me know if there is a solution for this, or if there will be one in the future. Because the problem I have now is that 1 silo just doesn't give enough credits if you don't have a ref, and that's kinda boring i.m.o.

Be sure to use these settings:

3d0M1dh.png

Link to comment
Share on other sites

Thx, I didn't think of those settings.

I also had to use a Teleporter instead of a touch volume, it works now.

Once the Teleporter is touched, it gets destroyed (after teleporting the harvester ofcourse).

Edit: Never mind, it works in editor, but doesn't work in-game..

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...