Jump to content

Assistance With Logic Please - Counting Disabled Airfields and Enabling a Third If Applicable


Recommended Posts

Posted (edited)

Salute,

I find myself, yet again, kneeling at the fountain of knowledge in search of enlightenment.

 

I am working on a scenario where I would like to deliver the following scenario and can not get my head around a solution. 

 

I have two airfields. I have working code that will disable the spawn point for a time duration should a number of infrastructure units be killed on the base.

What I would like to do is if BOTH airfields are out of operation at THE SAME TIME, I enable a third air start base (re-enforcements called in to protect the bases whilst they are down. I suppose I ought to then disable the air start if EITHER of the bases comes back on line?)

 

I have been thinking about using nested counters but can not see the logic through.

 

Is there anyone here that could advise with this scenario at all?

 

As always, I am very much appreciate your advice.

 

Cheers

DD_Friar

airfield operational.JPG

Edited by DD_Friar
JG4_Deciman
Posted

Quite easy...

 

Add a further Sequence as following

INPUT TIMER (short delay)

-> Check AF1 Timer (no delay)

-> Check AF2 Timer (no delay)

-> Enable 'Support Spawn'

 

both AF's have Timers setting them Operationable or Non Operationable

 

First Step:

Setting any of these 'Operationable' would need a further Trigger to disable 'Support Spawn'

Also let it disable the 'Check AF.. Timer'

 

Next step

Setting any of these 'Non Operationable' would need a further Trigger to

- enable 'Check AF... Timer'

- trigger 'INPUT TIMER'

 

Result:

Having any AF operationable should instantly disable 'Support spawn'

Having any AF non operationable should active the Check timer for that airfield

and start the 'INPUT TIMER' (delayed)

and in case 'any' of your AF's is operationable the chain ends (check timer is disabled) before 'Support spawn' is enabled

if both are not orerationable -> chain completed -> support spawn enabled

 

Deci

Posted

Just out of curiosity; i would like to see a mission when you got shove comes to push ... me as dumbo am kind of new to what one can do with spawning objects,

and what you can do to to reduce the CPU workload for complex mission setups. 

JG4_Deciman
Posted (edited)

That's what I'm trying now since months...

Creating a very complex mission...

 

First step is 'placing what you want' (inside editor)

Next step is 'creating logic needed' (inside editor)

Followed by 'checking mission' and getting aware of the fact: too much logic and/or objects

So: trying to reduce the 'used (spawned)' objects

Followed by 'checking mission' and getting aware of the fact: too much logic and/or objects if entire map is occupied - otherwise ok

So trying to 'outsource' parts of the complex logic....

 

Hard to do but possible! (but needs additional software which has to be coded...)

 

Deci

 

PS: Final result:

Every part of the logic (needed under all circumstance) that can be outsourced is a good part for the performance

 

 

Edited by JG4_Deciman
Posted
1 hour ago, jollyjack said:

Just out of curiosity; i would like to see a mission when you got shove comes to push ... me as dumbo am kind of new to what one can do with spawning objects,

and what you can do to to reduce the CPU workload for complex mission setups. 

 

 

In simple terms it comes down to mostly having only the units within the players' sphere of activity spawned or activated at any given time.

You can make exceptions to this selectively depending on your needs. For instance I might have a patrol or two active and flying around that the player may or may not encounter just to add a more random element (on top of already randomized logic at times.) Or I might leave all of the smoke active on a map etc.

 

Not all "logic" is a problem for mission performance, in fact for the most part you can ignore this. Where you can't ignore it is when it has to do with AI ground attack logic. This seems to have an impact on performance/TD for some reason, even if it's only a few aircraft. I can go on and on, point is design the mission so that AI units are activated/deactivated (or spawned/deleted) according to player proximity. Even here you can make exceptions selectively, just takes trial and error, and experience.

  • Thanks 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...