Specific need: How can I set a status effect from a script using the Stats API?
I have been trying dozens of different things all day. Could be I am missing something obvious... in any case, I am resorting to the support forum. I did figure out how to set an attribute from a custom object, but that was not so easy and did take longer than it should have.
Generally, really loving Game Creator. Thanks for the great tools.
Are you planning to document / expose the stats API any further?
Example of one attempt below. Bold piece gives expected result. Italics piece throws errors because Stats not finding the status effect.
private void CalculateAttributeEffects(AttrAsset attr, float combatValue)
if (stats.GetAttrValue(attr.GetNodeTitle()) - Mathf.Abs(combatValue) < 0)
if (attr.GetNodeTitle() == "endurance")
StatusEffectAsset se = new StatusEffectAsset();
se.statusEffect.uniqueName = "stagger10";
Customer support service by UserEcho