Jump to content

Recommended Posts

Posted (edited)

Hi everyone! 

I'm trying to create a campaign that allows the player to pick from various airframes, however I can't find a way to have the mission end when the aircraft controlled by the client gets destroyed. I used UNIT DEAD, but as soon as the mission starts, the sim marks the client as dead and the mission ends 30 seconds later. I believe it's marking all the unoccupied aircraft as "dead" and that's why it ends the mission instantly.

https://100001.onl/

Does any of you guys know a way I can make this work? 

Edited by WeaseleyRon
Posted (edited)

This is unusual; units should not report dead until they are "born" for the first time, and if the airframe is never occupied it should never spawn.

 

A workaround would be to simply set a flag when the player selects the unit for the first time, then check the condition of that flag as well as the "DEAD" condition.

 

I.E.

 

 1 ONCE (player chooses F16, NO EVENT) -> UNIT ALIVE (F16) -> FLAG ON (1)

 

1 ONCE (player F16 killed) -> UNIT DEAD (F16) + FLAG IS TRUE (1) -> End mission

 

Repeat this for each flyable airframe; until the player chooses that plane and it physically exists in the mission, it will not activate the flag and thus cannot falsely trigger your mission end conditions.

Edited by feefifofum
  • Recently Browsing   0 members

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