Page 1 of 1

Time delimited VP awards?

Posted: Thu May 23, 2019 2:14 pm
by Randomizer
I have started work on a week-long air strike scenario, which will award victory points (VP) only when the targets are destroyed within a certain time frame. This will be imposed on in their mission orders by using time-on-target (TOT) and mean that detailed mission planning becomes essential if the Player is to accumulate VP. I think that I can do this once using a counter but the problem is that the scenario plan is for multiple missions to be generated over a week or more. The Player will then need to manage both resources and and time.

Not sure if Lua is up to this or not so I thought that I would ask for help for possible trigger scripts. I have conceptualized the necessary action scripts already but still need to test them.

After reviewing the Lua documentation one option that might work may be to create a time trigger on the TOT with a VP action and replace the action with a zero-VP action when when time advances outside to the TOT window. The action still fires but if the targets are destroyed outside of the TOT window, the alternated action has fired and no VP are awarded.

Any help will be greatly appreciated and thank you in advance.

-C

RE: Time delimited VP awards?

Posted: Thu May 23, 2019 8:38 pm
by kevinkins
Interesting idea and question. Maybe the Trigger be the usual "unit is destroyed" and the Action be lua code where you test for elapsed time with ScenEdit_CurrentTime () and if the time is within the limits you set, change the score with ScenEdit_SetScore () else do nothing? ScenEdit_CurrentTime () uses Coordinated Universal Time (large numbers). The scenario start time would have to be held in a global variable of some sort to be accessed as the scenario progresses. I have used a dummy side score to hold "global variable" in the past. Just checked, command seems to be able to hold very large numbers as scores. Will be tedious at first and you might not be looking for this all at. Just a quick thought.

Kevin

RE: Time delimited VP awards?

Posted: Fri May 24, 2019 6:12 am
by Gunner98
Hay Chris

One way of doing it would be to set up the scoring events normally and then activate and deactivate them based on your time schedule using lua.

There is probably a slicker way of doing it though.

B

RE: Time delimited VP awards?

Posted: Fri May 24, 2019 12:25 pm
by Randomizer
Thanks for the responses, can probably move forward now. I did have a couple of ideas including the enabling/disabling of the scoring actions but was hoping for a more elegant (ie slicker) Lua solution. I will have to run some tests but I believe that VP for targets destroyed after the action is disabled will be added to the total the next time the action activates. If so this defeats the intended purpose but am cranking out a test scenario to see.

In Vietnam some strike missions had a TOT plus No Bombs Before/No Bombs After restrictions and I want to make sure that the Player gets zero-VP for attacking outside of these time limits, some of which were pretty tight.

-C

RE: Time delimited VP awards?

Posted: Fri May 24, 2019 1:04 pm
by Gunner98
Player gets zero-VP for attacking outside of these time limits

Considering the real life limitations you may want to consider negative VP for hitting outside the window. Some players may be tempted by expediency vice VPs.

B

RE: Time delimited VP awards?

Posted: Fri May 24, 2019 1:22 pm
by Randomizer
I have a cunning plan to prevent Players doing that! However, intend that targets which survive will generate negative VP. Am still working out how to script that.

-C

Deleting a Side?

Posted: Sat May 25, 2019 12:52 am
by Randomizer
You can use Lua to create a new Side and you can script units changing Sides. Can you script deleting an entire Side? Thanks in advance.

-C