Jump to content

Noob Q: Destroying planes on the ground


cfrag

Recommended Posts

I'm trying my hand on mission creation, and after RTFMing a couple of time, I felt I was ready to try my hand at this, only to fail miserably.

 

Here's what I'm trying to do:

 

Have the players bomb a group "Froggers" consisting of 4 enemy planes that are sitting still on the ground. When at least two of the planes are destroyed, send out a message to all.

 

Here's what I did:

I placed a flight of 4 SU 25 on the tarmac of Kutaisi, Task "nothing", and placed them as 'take off from ramp' (cold). In order to force them to stay put (they would otherwise try to take off), I drained all their fuel. Now they just sit there. Is this already a problem?

 

I then created a trigger

Once: Group "Frogger" dead OR Group "Frogger" Alive Less Than 70 --> Message to all "Test Successful"

 

Next I take a Hornet, bomb the crap out of the Su 25 -- yet even after destroying 3 of them, no message.

 

It was my interpretation that "Group <Frogger> Alive Below 70" means than when less than 70% of that group (4 units = 100%, 25% per unit) survives, i.e. more than 1 plane destroyed should cause the trigger to fire.

 

So what am I doing wrong? Is it because the planes never take off and therefore don't really count as alive?

Link to comment
Share on other sites

Instead of draining fuel and such, trying putting tbe su25s on 'uncontrolled'

 

This will spawn your su25's but without pilots, so they will just sit there.

 

You can only select "uncontrolled" when you place the su25's as cold on a parking spot, anything else and this option will not be avialbly.

 

Incontrolled is different to late activation in that it does spawn the vehicle but without intelligence ie the pilot

 

Verstuurd vanaf mijn SM-G930F met Tapatalk

Link to comment
Share on other sites

Group su25 name "Frogs", consisting of four units called respectively "frog1", "frog2" etc.

 

Six triggers to set a flag, and as each su25 unit is destroyed increase the value of that flag. When the value of that flag reaches a certain amount, send a message on screen

 

MISSION SET / SET FLAG VALUE 1=0

 

ONCE / UNIT DEAD frog1 / flag 1 increas 10

 

Repeat the above trigger for the units frog2 frog3 and frog4

 

ONCE / FLAG EQUALS flag1 equals 20 / MESSAGE TO COALIOTION your side blue or red " joepie, two frogs dead!"

 

Try this, should work but i'm not at home behind my pc to check it

 

 

Verstuurd vanaf mijn SM-G930F met Tapatalk


Edited by Breaklight
Link to comment
Share on other sites

Hi cfrag. That trigger logic should work, as you describe it. Keep in mind that aircraft must be fully destroyed (burnt-out husk, no intact fuselage at all) in order to activate a DEAD condition. This can be particularly tricky with jets that are parked, as they will often require multiple direct hits.

 

A different solution might be to increment a flag as each aircraft is damaged a certain amount.

 

UNIT'S LIFE LESS THAN (Plane 1, 90) -> FLAG INCREASE (1, 1)

 

You can then check for that flag's value, as Breaklight suggests.

Link to comment
Share on other sites

Instead of draining fuel and such, trying putting tbe su25s on 'uncontrolled'

 

This will spawn your su25's but without pilots, so they will just sit there.

 

Thank you so much for that hint. I tried that initially, but the trigger never fired. That's when I 'deduced' (based on insufficient evidence' that in order to be alive, a pilot must be present. Hence the no-fuel 'trick'. So I-m having the same issue with the trigger not firing when I'm using uncontrolled planes.

Link to comment
Share on other sites

Group su25 name "Frogs", consisting of four units called respectively "frog1", "frog2" etc.

 

Six triggers to set a flag, and as each su25 unit is destroyed increase the value of that flag. When the value of that flag reaches a certain amount, send a message on screen

 

That is a nice work-around, thank you! I'll try it - it looks like a hassle to set up, and still makes me feeling uneasy because I feel that I didn't really understand what went wrong with my initial attempt.

 

Which brings me to my next question: Flags. From a game logic's perspective, am I right to see flags as working as follows: (my notes are really contradictory here):

- flags are numbered, with their number (array index in a normal computer language) making them unique to access and differentiate

- open?: how many flags are available, i.e. what is the maximum index number?

- flags can have integer values starting from 0 to positive

- open?: what is the maximum flag value?

- open?: can flag values be negative?

- any flag value other than zero is interpreted as 'true' when tested as "Flag is true"

- setting a flag to "ON" will really set it to one

- setting a flag to "OFF" will set it to zero

- open?: what happens if flag 3 is currently set to the value 5 and I use 'Flag 3 On''? What value will it be set to? 1 or 5?

- the time of the last value change will be remembered and can be queried with 'time since flag'

- on mission start, all flags are set to zero

- open?: what will time since flag return for a flag that was never set?

 

Thanks for any pointers.

 

-ch

Link to comment
Share on other sites

Flag max Value is 999. A Flag has two properties: "true" or "false" AND a value from 0 (which is NOT "false") to 999.

Setting a flag to a value automatically sets it as "true". This way you can use Time since flag while the flag still can be increased or reduced to 0...

On mission start flags have a value of -1 IIRC.

Shagrat

 

- Flying Sims since 1984 -:pilotfly:

Win 10 | i5 10600K@4.1GHz | 64GB | GeForce RTX 3090 - Asus VG34VQL1B  | TrackIR5 | Simshaker & Jetseat | VPForce Rhino Base & VIRPIL T50 CM2 Stick on 200mm curved extension | VIRPIL T50 CM2 Throttle | VPC Rotor TCS Plus/Apache64 Grip | MFG Crosswind Rudder Pedals | WW Top Gun MIP | a hand made AHCP | 2x Elgato StreamDeck (Buttons galore)

Link to comment
Share on other sites

Flag max Value is 999. A Flag has two properties: "true" or "false" AND a value from 0 (which is NOT "false") to 999.

Setting a flag to a value automatically sets it as "true". This way you can use Time since flag while the flag still can be increased or reduced to 0...

On mission start flags have a value of -1 IIRC.

 

Thank you so much for the clarification! That flag thing surely looks like a mess from a programming perspective (an object consisting of a bool, an int and a time value, with implicit dependencies between the attributes? Are you kidding me?)

 

Just to be sure:

"Setting a flag to a value automatically sets it as "true"."

 

Is this also the case when I set the value of a Flag to zero (be it through decrease or setting directly)? What a truly strange design.

Link to comment
Share on other sites

Thank you so much for the clarification! That flag thing surely looks like a mess from a programming perspective (an object consisting of a bool, an int and a time value, with implicit dependencies between the attributes? Are you kidding me?)

 

Just to be sure:

"Setting a flag to a value automatically sets it as "true"."

 

Is this also the case when I set the value of a Flag to zero (be it through decrease or setting directly)? What a truly strange design.

 

Zero is false. Any other number greater than zero is true.

 

https://wiki.hoggitworld.com/view/DCS_editor_conditions#Flag


Edited by pmiceli

 

 

 

 

EDsignaturefleet.jpg

Link to comment
Share on other sites

Zero is false. Any other number greater than zero is true.

 

https://wiki.hoggitworld.com/view/DCS_editor_conditions#Flag

Yep, this.

"Time since..." is a scheduler running in the background if I am not mistaken, so a "time since flag 1, 20sec" should Internally start a scheduler when flag 1 is true that initiates the action after 20sec.

Shagrat

 

- Flying Sims since 1984 -:pilotfly:

Win 10 | i5 10600K@4.1GHz | 64GB | GeForce RTX 3090 - Asus VG34VQL1B  | TrackIR5 | Simshaker & Jetseat | VPForce Rhino Base & VIRPIL T50 CM2 Stick on 200mm curved extension | VIRPIL T50 CM2 Throttle | VPC Rotor TCS Plus/Apache64 Grip | MFG Crosswind Rudder Pedals | WW Top Gun MIP | a hand made AHCP | 2x Elgato StreamDeck (Buttons galore)

Link to comment
Share on other sites

What is the flow of evaluation? In other words, is this a multithreaded event loop? Are the setting of flags, the checking of flags and the execution of actions all happening concurrently? Or are they happening sequentially?

How often are trigger conditions checked?

4930K @ 4.5, 32g ram, TitanPascal

Link to comment
Share on other sites

The ME triggers is sequential AFAIK. It's going through all triggers and conditions top down (order can matter especially for triggers!) and it evaluates every second (?).

Basically think of the trigger list as a long loop every second...

A scheduler runs after the allotted seconds passed, but is still executed in sequence.

Shagrat

 

- Flying Sims since 1984 -:pilotfly:

Win 10 | i5 10600K@4.1GHz | 64GB | GeForce RTX 3090 - Asus VG34VQL1B  | TrackIR5 | Simshaker & Jetseat | VPForce Rhino Base & VIRPIL T50 CM2 Stick on 200mm curved extension | VIRPIL T50 CM2 Throttle | VPC Rotor TCS Plus/Apache64 Grip | MFG Crosswind Rudder Pedals | WW Top Gun MIP | a hand made AHCP | 2x Elgato StreamDeck (Buttons galore)

Link to comment
Share on other sites

  • Recently Browsing   0 members

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