Jump to content

Timed Deactivate/Delete...?


Recommended Posts

Posted

Hi... 

 

     I'm trying to build a multi emplacement attack mission for TC and trying to save PC resources by deactivating/deleting vehicles once I've passed through an area by timed deletion, my question is...

 

 Is there a way to deactivate/delete destroyed Tank Platoon/convoys after a set time?

 

I've tried "delete on death" but the Tanks disappear before your eyes (immersion killer).

 

I've tried "On Killed" Event with timer - Only deletes one Tank from a Platoon.

 

I've tried the Delete MCU - Only deletes one Tank from a Platoon.

 

I've tried the Deactivate MCU - Only deletes one Tank from a Platoon.

 

I've tried an out of area Check Zone->deactivate MCU for whole emplacement vehicles/artillery/tanks etc., only works if no vehicles have been killed.

 

Any help would be greatly appreciated.

 

 

  • 2 weeks later...
  • 2 weeks later...
Posted

To delete a group you need to object link the delete MCU to every single unit in that group!

  • Thanks 1
Posted

On a tangent, and not sure if this is rhetorical:   at what point does all the logic to save resources become more costly than what we thought we're saving? 

  • Like 1
Jaegermeister
Posted (edited)
49 minutes ago, dbuile said:

On a tangent, and not sure if this is rhetorical:   at what point does all the logic to save resources become more costly than what we thought we're saving? 

 

It doesn't

 

On 11/18/2022 at 7:11 AM, Monty_Thrud said:

I'm trying to build a multi emplacement attack mission for TC and trying to save PC resources by deactivating/deleting vehicles once I've passed through an area by timed deletion, my question is...

 

 Is there a way to deactivate/delete destroyed Tank Platoon/convoys after a set time?

 

I've tried "delete on death" but the Tanks disappear before your eyes (immersion killer).

 

I've tried "On Killed" Event with timer - Only deletes one Tank from a Platoon.

 

I've tried the Delete MCU - Only deletes one Tank from a Platoon.

 

I've tried the Deactivate MCU - Only deletes one Tank from a Platoon.

 

I've tried an out of area Check Zone->deactivate MCU for whole emplacement vehicles/artillery/tanks etc., only works if no vehicles have been killed.

 

Any help would be greatly appreciated.

 

 

 

If they are spawned, a delete command should make the vehicle go away

If you uncheck "delete on death" the vehicle will sit there for the rest of the mission

correct

correct

If you deactivate the leader of a formation that has "enabled" unchecked, the whole formation will deactivate. If "enabled" is checked in the advance properties, they will not deactivate, because "enable" is basically forced activation.

When you use a checkzone to activate/deactivate a group, you need to disable the activating checkzone when one of the vehicles is killed, or you could create a cycle where a new vehicle continuously spawns into another damaged vehicle, damaging that vehicle, etc that can lock up your mission. 

There is no reason you can't use a simple checkzone to deactivate any vehicle or plane at a certain point.

 

Test mission attached, it works as advertised. I used a plane instead of a tank, because it's faster. They work the same way though.

 

Deactivate Test.zip

 

 

Edited by Jaegermeister
Added test mission as example
  • Thanks 4
Posted

 

26 minutes ago, Jaegermeister said:

It doesn't

 

Thanks, Jaegermeister.  Should we kinda think of check zones as "free" (I see references to Complex Triggers being costly).    My early foray into the mission editor, I was nesting check zones to manage more check zones, and started wondering if I'm just over-engineering the resource management... :)   

Jaegermeister
Posted

They aren't free, but take up way less resources than say, a city fire.

 

Best practice is to work in zones and enable and disable things you don't need in a sort of a bubble around the player. Use a trigger like a waypoint to enable checkzones or proximity triggers in the area you will be. Triggers are free.

  • Thanks 1
Posted

Thanks Jaegermeister, but I have already used that method, I mostly use it for AAA emplacements for Planes that wont attack them. It's the destroyed vehicles/Tanks groups/platoons/AT guns etc that will not disappear with "delete on death" unticked, I untick it because the vehicles vanish before your eyes on the battlefield as you move through the area.

 

I had tried to build an in-zone-out-zone check-zone  trigger, you approach into a town ->in-zone-check-zone triggers->Tanks/AT-guns/AAA appear->you kill targets->move on out of zone->out-zone-check-zone deletes/disables dead/killed vehicles...onto next emplacement, resources freed up...

 

So if I could increase the time that they disappear after killed or in-zone-out-zone deactivate much more can be put into the area.

 

Thanks for the help anyway...?

Jaegermeister
Posted
8 hours ago, Monty_Thrud said:

It's the destroyed vehicles/Tanks groups/platoons/AT guns etc that will not disappear with "delete on death" unticked, I untick it because the vehicles vanish before your eyes on the battlefield as you move through the area.

 

Sorry, I misunderstood what you were trying to accomplish. So you want to set the enemy vehicles to not delete after death, and then be able to delete them after you kill them?

 

Not to be snarky, but that one is self explanatory. I can't help you there

  • Thanks 1
Posted (edited)

I assume @Monty_Thrud wants:

  • Have vehicles be able to spawn in when players are nearby (my example is when enemy planes are nearby)
  • These same vehicles will despawn when not needed (aka: no enemy players are nearby)
  • Each individual vehicle entity that gets destroyed will no longer respawn in when players return to the area

 

 

Here's what that looks like....

 

At the top are the checkzones used to determine if enemies are in the area or not. Below that is the spawner logic for each vehicle. If enemies are nearby, vehicles spawn in. If not, then the vehicles delete themselves. If enemies are near and destroy a vehicle, it will never spawn in again. Below the spawner logic for each individual vehicle, is the vehicles entities, and below that is their first given command. In this case, the command is to attack the area of enemy fighters.

image.thumb.png.3ee454c7d6e84be1e7eaa553bf132682.png

Checkzones at the top, then spawner logic, then the vehicles, and finally at the bottom is an attack area for each vehicle.

 

 

Here's a close up of the checkzones. Basically, it's pulse the inside and outside checkzone every second to see if enemies are inside the 'inside checkzone'. If so, then we spawn in our friendly vehicles.

image.thumb.png.9344353849a7f30c47c484cf6e7a9264.png

Two checkzones, one inside and one outside. They constantly check to see if any planes are inside the given area.

 

 

Next up, is spawner logic. OnCheckzoneEnter spawns in a vehicle entity. It also can get disabled if the vehicle ever gets destroyed. Meaning, the next time enemies come nearby, this particular vehicle will not respawn in (if it has been previously destroyed). The OnCheckzoneExit just deletes this specific vehicle entity when enemies leave the area.

image.thumb.png.9b91c42eb71ae52f4dee49478e45d683.png

OnCheckzoneExit - If enemy planes leave the area then delete the vehicle entity. OnCheckzoneEnter - spawn the vehicle entity if it hasn't been destroyed yet.

 

 

Finally we have our vehicle entity and it's first task. In this case, it's assigned to attack enemy planes with the Command Attack Area MCU. Note that there's a strange blue line going from the spawner, to the vehicle entity, to the attack area. This blue line is actually an On Spawned Report from the vehicle entity. It basically tells the vehicle, "Once you spawn in, I want you to do X!" Again in our case, the vehicle will be told to attack enemy planes in the area. Don't forget to object link everything to the vehicle appropriately. 

image.thumb.png.b4f2b131bb511d5b96c61a2137b56110.png

It's important to use a spawn report from the spawner to the first command you want to give the vehicle entity.

 

 

image.thumb.png.17f2755f9b6d589853597f27ee8d0d4a.png

Using the context menu, you can add an OnSpawnedReport to each vehicle.

 

 

 

And as always, feel free to take my logic and use it as you see fit. This zip file is a group; not a mission file. You must add the group to your own mission(s) via the import tool. Good luck in your mission building, and if you have questions let us know.

 

 AAARespawnableVehicles.zip

 

 

 

 

Edited by Sketch
  • Thanks 4
  • Upvote 1
Posted
On 12/9/2022 at 1:33 AM, Jaegermeister said:

 

Sorry, I misunderstood what you were trying to accomplish. So you want to set the enemy vehicles to not delete after death, and then be able to delete them after you kill them?

 

Not to be snarky, but that one is self explanatory. I can't help you there

 

I understand...but...I managed to delete a vehicle with that "delete after death" unticked, with a deleteMCU/ deactivateMCU however it was only 1 vehicle from the Column/Platoon, your help is appreciated though ?.

 

The problem is..."delete on death" ticked has a timer for when they will disappear, player AI controlled tanks vanish(all guesswork) in about 15 seconds, AI only Stugs/Tanks about 1-2 min/Artillery/Trucks/etc about 2-3 mins, this is all guesstimation but you get the idea, they vanish too soon.

 

  I was wanting to make them disappear when out of the area...so... Check zone IN area>entities appear>kill entities>OUT area>killed entities vanish>freed resources>onto next battle/town/area/mission objective.

 

Sorry for the poor explanations.

 

Thanks Sketch, not quite what I was after, my fault for poor explanation, will use that for future mission though...??

 

 

 

Posted

I am not sure about that and Sketch will correct me here, but there is an internal timing system in the game that will delete whatever we do a destroyed vehicle.

At least some years ago, once the vehicle is burnt down the fire smoke effects (from the game) do not last very long and after that part is finished then the destroyed object would disappear after a length of time that would depend on ticking and unticking the Delete after death box. If you tick it then it is short time, and if you u tick it it lasts a little longer. The idea being to avoid what is seen unnecessary load on the sim.

Maybe this has changed now but I am not sure things stay indefinitely (as they should) in a sim of the real world. The only case would be in the mission that you will never be back in that region of the map that will stay out of your viewing horizon. In that case it does make sense to clean up. But it is a special case and should not be the default way.

 

The other internal timing that makes me mad is the AI planes that just disappear after landing. This is not sim it is fantasyland.

Posted (edited)
22 minutes ago, Monty_Thrud said:

I was wanting to make them disappear when out of the area...so... Check zone IN area>entities appear>kill entities>OUT area>killed entities vanish>freed

Maybe you didn't read my post?

 

My entities spawn in when players are near them. Therefore, no resources wasted until players are nearby.

 

Players can shoot the entities while they're spawned in. When you destroy those entities they're gone forever just like if they were in the mission the entire time.

 

When players leave the area, all the alive entities despawn. Again, no resources wasted.

 

If players come back, only the alive entities will respawn.

 

This matches your requirements exactly.

Edited by Sketch
Posted

I did read it just misunderstood it, thank you, much appreciated, I shall give it a go as I cant get very much else to work properly as AI seems porked.?

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...