Hard Light Productions Forums
Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: Solatar on August 07, 2008, 11:24:59 am
-
I'm making a mission in which the player has to escort 5 cruisers through a jump node. In order to pass a certain objective, he must protect at least 4 out of the 5. I created a variable, and I have 5 sexps set so that when each one departs, 1 is added to the variable. The objective becomes true when the variable > 3.
If I succeed, it works great. However, I'm having trouble failing it. Instead of the goal returning failed if more than one cruiser is destroyed, it just fails to return.
Am I missing something?
-
You are. Rather than failing, it's just incomplete as the events system isn't clairvoyant enough to know for certain that nothing else will ever add another +1 to that variable. Adding a check for "NOT percent-ships-destroyed 40" for the 5 cruisers to the condition should do the trick.
However, you could also just drop the variable completely and use "percent-ships-departed 80" as the condition :)
-
And I thought I was being oh-so-clever with my fancy variables. I'll try it with percent-ships-depart instead. Thanks.