Jump to content

Flags and respawn lives.


LT_F4LC0N

Recommended Posts

Hi everyone. First post here on the forum.

I’ve been a long time sim enthusiast since the days of Chuck Yeagers air combat (first game as a kid) Strike Commander and even Mig29 on the mega drive.

 

So I moved over from BMS to DCS when the F14 was released and I’m absolutely loving the high fidelity of the sim. Great work guys!!

 

So for my Question, limiting respawns in MP. I’ve seen it asked a few times but it always seems to come back to using the CSAR script and I’m not quite ready to start adding scripts yet.

I’ve also seen you can limit airfield resources but then the resources are shared between pilots rather than each pilot having only two lives.

 

My solution was to use triggers and flags but for some reason it doesn’t seem to work.

 

Trigger. Once, ON PILOT DEAD. Condition, UNIT DEAD (PILOT 1), UNIT SPEED >10KTS. Action, FLAG ON 1.

Then....

Trigger. Once, ON PILOT DEAD. Condition, FLAG TRUE 1, UNIT DEAD (PILOT 1), UNIT SPEED >10KTS. Action, MESSAGE TO ALL (Mission Failed), FLAG ON 2

Then....

Trigger once, NO EVENT. Condition, TIME SINCE FLAG 2 (90 secs). Action, END MISSION.

 

Is the problem that FLAG 1 is only on for the time the pilot is ‘dead’ and then turns off when you respawn? Should I change it from ONCE to SWITCHED CONDITION or CONTINUOUS?

 

Any help is greatly appreciated. I’m still learning and want to get good at creating missions and eventually add more scripts into them but this seemed like a good way to limit pilot lives and make the mission more challenging.

 

Thank you.

Link to comment
Share on other sites

Remove ON PILOT DEAD. You don't need event handlers for 99% of what you're doing and more often than not end up shooting yourself in the foot if you don't understand how they work. NO EVENT checks for the trigger conditions only, which is perfectly adequate for your purposes here.

 

When adding ON PILOT DEAD that means the conditions have to be met at the exact moment moment a PILOT DEAD event occurs and are otherwise ignored.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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