sadhukar Posted February 13, 2019 Share Posted February 13, 2019 Sorry for the long winded title. Basically in the mod there is a chance that, upon completion of an excellent or flawless mission, the squad gets a boost to their combat intelligence. However how do I make them get AP as well to match their new CI rating, like if I train them through covert actions? A snippet of the code is as follows: if (MissionRating == "Flawless") { ImproveComIntChance = default.FlawlessComIntChance; RewardAPChance = default.FlawlessAPChance; APReward = default.FlawlessAPReward; } // Random chance to improve the Combat Intelligence of all soldiers or to gain Ability Points RandRoll = `SYNC_RAND_STATIC(100); if (RandRoll < ImproveComIntChance && ImproveComIntChance > 0 && EligibleUnits.Length > 0) { for (i = 0; i < EligibleUnits.Length; ++i) { ComIntEventContext = XComGameStateContext_MissionRatingComIntEvent(class'XComGameStateContext_MissionRatingComIntEvent'.static.CreateXComGameStateContext()); ComIntEventContext.AssociatedUnitRef = EligibleUnits[i].GetReference(); //I'm guessing somewhere here I should add the function to increase AP based on their new CI rating ComIntEventContext.MissionRating = MissionRating; ComIntEventContext.strStatType = "Combat Intelligence"; ComIntEventContext.UnitIndex = i; `TACTICALRULES.SubmitGameStateContext(ComIntEventContext); } } else if {...} Link to comment Share on other sites More sharing options...
Recommended Posts