Jump to content

Random tasks via trigger zone


Galm99
 Share

Recommended Posts

Quick noob question,

 

I have created a mission with three air to air taskings and wanted to place a trigger zone with a random chance of starting any of the three, is this possible using triggers?

 

The idea is I fly in to the zone and get tasked with one of the three tasks at random to ensure its not the same task eveytime I fly into the trigger zone.

 

Probably very easy but I have only just dived in to the ME so require a nudge in the correct direction, many thanks in advance.

RAF Air UK Website

http://www.rafairuk-dcs.co.uk/

Mike Alpha Tango's YouTube Channel

http://www.youtube.com/channel/UC9oKDSVDDDErRVjRFqgu3bA

 

Intel i7-6700k

RTX 2080TI

Gigabyte Z170-gaming K3

32gb DDR4 RAM

Hotas Warthog

CV1

 

Link to comment
Share on other sites

Not sure what you mean with tasking, do you mean a route change or merely a message? If the latter you can create randomness in a couple of ways, for this I'd use FLAG set random, set a flag 1 from 0 to 3 and then create three lines with a condition flag 1 = 1, flag 1 =2 and flag 1=3 with the coresponding message output.

___________________________________________________________________________

SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *

Link to comment
Share on other sites

Sorry let me explain, that's my tank commander talk coming out lol

 

I mean that I've created 3 air to air engagements which I would like to randomly be given when entering a trigger zone.... so say you enter the trigger zone and engagement 1 spawns but 2 and 3 do not, but another time you enter 3 may spawn but 1 and 2 do not.

 

If this makes sense

RAF Air UK Website

http://www.rafairuk-dcs.co.uk/

Mike Alpha Tango's YouTube Channel

http://www.youtube.com/channel/UC9oKDSVDDDErRVjRFqgu3bA

 

Intel i7-6700k

RTX 2080TI

Gigabyte Z170-gaming K3

32gb DDR4 RAM

Hotas Warthog

CV1

 

Link to comment
Share on other sites

Yep, so the same way, but you create all groups first and deactivate them. Then run the randomisation to pick a number between 1 and three. For conditions that result in 1, activate group 1 etc.

 

I've probably described this terribly. just say so and I'll dig out a mission with something similar you can copy.

___________________________________________________________________________

SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *

Link to comment
Share on other sites

Cool, glad it helped. You can use this technique to stack an almost unlimited set of scenarios into one mission for rpelayability. i used it personally to have 14 random radar contacts to investigate as an interceptor, really made the misison last a long time.

___________________________________________________________________________

SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *

Link to comment
Share on other sites

I'm still struggling with this alittle so far I have

 

Type

Switched condition

Condition

Part of coalition in zone

Actions

Flag set random value

FLAG: 1

VAL LIM MIN: 0

VAL LIM MAX: 3

 

And have set separate switched conditions of "Flag is true" for each group I wish to activate, however cant seem to get the trigger to work.

RAF Air UK Website

http://www.rafairuk-dcs.co.uk/

Mike Alpha Tango's YouTube Channel

http://www.youtube.com/channel/UC9oKDSVDDDErRVjRFqgu3bA

 

Intel i7-6700k

RTX 2080TI

Gigabyte Z170-gaming K3

32gb DDR4 RAM

Hotas Warthog

CV1

 

Link to comment
Share on other sites

Don't set it to "flag is true" you need to set it it "flag value = 1 / 2 / 3" and activate the relevant group.

 

 

Flag is true would be more appropriate if you were to set "unit in zone / flag (x) = true." In this case you're talking about the value within a certain flag- not actually different flags and whether or not different flags have been set (ie: true).


Edited by ENO

"ENO"

Type in anger and you will make the greatest post you will ever regret.

 

"Sweetest's" Military Aviation Art

Link to comment
Share on other sites

sorry after rechecking its not "flag is true" it is actually "flag equals" and then the relevant number i.e flag 1 equals 2, sorry for the confusion

RAF Air UK Website

http://www.rafairuk-dcs.co.uk/

Mike Alpha Tango's YouTube Channel

http://www.youtube.com/channel/UC9oKDSVDDDErRVjRFqgu3bA

 

Intel i7-6700k

RTX 2080TI

Gigabyte Z170-gaming K3

32gb DDR4 RAM

Hotas Warthog

CV1

 

Link to comment
Share on other sites

Wonder if it's the "part of coalition in zone" issue. If it's just your aircraft that is "all of coalition in zone." Try going "unit in zone" and identify your aircraft.

 

Are you going to set it up so you fly out of the zone after battle and then re-enter to get one of the other aircraft?


Edited by ENO

"ENO"

Type in anger and you will make the greatest post you will ever regret.

 

"Sweetest's" Military Aviation Art

Link to comment
Share on other sites

Usually it makes no different if you use "part of group in zone" with one Aircraft or multiple in the group.

If it is inside the zone it is a "part" of the group.

 

The random number should be random(1, 3) to get 1,2 or 3 NOT random(0, 3)!

If you get a result of "0" and you don't have an action on that condition, it won't trigger anything.

Shagrat

 

- Flying Sims since 1984 -:pilotfly:

Win 10 | i5 10600K@4.1GHz | 32GB | GeForce RTX 2080S - Acer XB280HK 28" 4k | TrackIR5 | Simshaker & Jetseat | VIRPIL CM 50 Stick & Throttle | MFG Crosswind Rudder Pedals | TM Cougar MFDs | a hand made UFC | AHCP | 2x Elgato StreamDeck (Buttons galore)

Link to comment
Share on other sites

If you are not sure of the trigger working, use a simple "Message to all" action to tell you which trigger fired so you see the message in game when the condition is ok and actually triggers.

Shagrat

 

- Flying Sims since 1984 -:pilotfly:

Win 10 | i5 10600K@4.1GHz | 32GB | GeForce RTX 2080S - Acer XB280HK 28" 4k | TrackIR5 | Simshaker & Jetseat | VIRPIL CM 50 Stick & Throttle | MFG Crosswind Rudder Pedals | TM Cougar MFDs | a hand made UFC | AHCP | 2x Elgato StreamDeck (Buttons galore)

Link to comment
Share on other sites

Ah brilliant I shall alter that, found out the problem I had the trigger zone set as "once" as apposed to "switched" seems all good now.

 

Thank you all

RAF Air UK Website

http://www.rafairuk-dcs.co.uk/

Mike Alpha Tango's YouTube Channel

http://www.youtube.com/channel/UC9oKDSVDDDErRVjRFqgu3bA

 

Intel i7-6700k

RTX 2080TI

Gigabyte Z170-gaming K3

32gb DDR4 RAM

Hotas Warthog

CV1

 

Link to comment
Share on other sites

Is it still not working?

Place a message to all as a debug on the trigger output to set it, for starters whilst you check everything.

 

Your next trigger is a ONCE with conditions of FLAG 1 = 1 and an activate group as an output.

Next one is a ONCE with conditions of FLAG 1 =2 etc.

 

Each condition once met, will only replay ONCE. Reason for this is you can activate the group twice and the other issue is that you might get 1 twice as the first flag when you enter the zone again and get nothing as a response. You'll have to share more details on the mission design to allow me to suggest ideas for that, my method supports one scenario out of the three, once only per mission.

___________________________________________________________________________

SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *

Link to comment
Share on other sites

The trigger would only start a mission once so I had no way to complete all 3 missions, due to the trigger type being once instead of a switched trigger which I required to get a mission each time I enter the zone.

RAF Air UK Website

http://www.rafairuk-dcs.co.uk/

Mike Alpha Tango's YouTube Channel

http://www.youtube.com/channel/UC9oKDSVDDDErRVjRFqgu3bA

 

Intel i7-6700k

RTX 2080TI

Gigabyte Z170-gaming K3

32gb DDR4 RAM

Hotas Warthog

CV1

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...