Removing Jets Not Yet Taken Off

All discussions & material related to Command's Lua interface

Moderators: angster, RoryAndersonCDT, michaelm75au, MOD_Command

Post Reply
butch4343
Posts: 327
Joined: Thu Mar 26, 2015 2:09 pm

Removing Jets Not Yet Taken Off

Post by butch4343 »

Folks,

This to me is a complicated thing Im trying to achieve, and wondered if anyone could proffer some thoughts as to how I might achieve it.

The Player has a squadron of 12 jets, what I would like to simulate is three jets being tasked else where, sounds simple enough right?

My problem is I dont want the jets to be deleted if the player has already sent them on their way to a target, because that would be unrealistic.

So heres what I have so far:

I have an event trigger and conditions , with a LUA script that will delete Victor #1, Victor #2 and Victor #3, and that works perfectly.

So is there a Lua script, that can deactivate an event, am thinking that i set up an event that is something like:

The Trigger is if Victor #1 is over the north sea

and the action would be something like

Event_Delete{Event='Victor #1 Removed' , Active=false}

Anyone any ideas?

Kind Regards

Butch




angster
Posts: 89
Joined: Mon Oct 12, 2015 10:25 am

RE: Removing Jets Not Yet Taken Off

Post by angster »

User avatar
Gunner98
Posts: 5974
Joined: Fri Apr 29, 2005 12:49 am
Location: The Great White North!
Contact:

RE: Removing Jets Not Yet Taken Off

Post by Gunner98 »

Butch

It seems to me you can achieve what you want by shifting those units to another side and assigning them to a mission which is active on that side.

You should accompany the event with a message telling the player that the units have been re-tasked.

You can de-activate the mission on the player side but that is tricky since the player may have changed things.

In this case the player will get a message and then will watch them fly away into the sunset and not have any control over them.

B
Check out our novel, Northern Fury: H-Hour!: http://northernfury.us/
And our blog: http://northernfury.us/blog/post2/
Twitter: @NorthernFury94 or Facebook https://www.facebook.com/northernfury/
butch4343
Posts: 327
Joined: Thu Mar 26, 2015 2:09 pm

RE: Removing Jets Not Yet Taken Off

Post by butch4343 »

Ah Gunner,

I fear I havent explained myself well enough, and now that I read what I wrote, I understand your response.

So what am looking to do is :

If the player uses the aircraft, by sending them over the north sea, then I dont want the delete/re-assign/re-task them whilst the player is using them.

If on the other hand they are still lying around on their airfield when then I want to delete them.

Kind of like the players boss saying, either use em or loose em.

Regards

Butch
butch4343
Posts: 327
Joined: Thu Mar 26, 2015 2:09 pm

RE: Removing Jets Not Yet Taken Off

Post by butch4343 »

Angster,

Thanks for the links, now I just need to work out how to create a script lol

Regards

Butch
User avatar
Gunner98
Posts: 5974
Joined: Fri Apr 29, 2005 12:49 am
Location: The Great White North!
Contact:

RE: Removing Jets Not Yet Taken Off

Post by Gunner98 »

Oh OK.

You could do that with a counter. Each time an AC departs the base, it would trigger a VP on a non-player side. If the VP count is not at a certain level at a specific time, you do the switch. If it is high enough it means the AC have departed the base area for some reason and the event does not trigger.


Not as elegant as you could probably do in Lua but it should work.

B
Check out our novel, Northern Fury: H-Hour!: http://northernfury.us/
And our blog: http://northernfury.us/blog/post2/
Twitter: @NorthernFury94 or Facebook https://www.facebook.com/northernfury/
butch4343
Posts: 327
Joined: Thu Mar 26, 2015 2:09 pm

RE: Removing Jets Not Yet Taken Off

Post by butch4343 »

Gunner,

Thanks, that worked bueatifully for mate,

As always in this forum members debt!

Regards

Butch
Post Reply

Return to “Lua Legion”