3aq Posted May 31, 2019 Share Posted May 31, 2019 (edited) Making a bit of headway into weapon scripting, convoluted linkage aside.. I've encountered one stellar hiccup I am unable to address, so here goes Resolved.Here's my script: scriptName _OnEffectBloodGold extends activemagiceffect {Script to gain gold based on the amount of health lost.} import Math miscobject property Gold auto Event OnEffectStart(Actor akTarget, Actor akCaster) float BaseHP = Math.Ceiling(akTarget.GetBaseActorValue("Health")) float CurrentHP = Math.Ceiling(akTarget.GetActorValue("Health")) float HealthPercent = CurrentHP / BaseHP int Calc = BaseHP * (1 - HealthPercent) akCaster.AddItem(Gold, Calc ) EndEvent when variables are singular, the effects shows up, ie int BaseHP or int CurrentHPbut when they are combined, ie int Calcit does not work.unsure what I may be doing wrong.. :psyduck: Edited May 31, 2019 by 3aq Link to comment Share on other sites More sharing options...
3aq Posted May 31, 2019 Author Share Posted May 31, 2019 (edited) issue resolved; math.ceiling works for everything except for the calc. Edited May 31, 2019 by 3aq Link to comment Share on other sites More sharing options...
Recommended Posts