*scratches head*
I just want to give the player 1 of 5 potential diseases for eating raw meat... everything about the script works fine but the actual giving of the disease...
Game.GetPlayer().AddSpell(DiseaseAtaxia)
That should work right?
It tells me the disease is not defined. I cant seem to figure out how to define it in the properties window...
How did you define the variable DiseaseAtaxia? until you give it a value, it's just a label. Since AddSpell is expecting a Spell, you should define something like
import GameImport UtilityFormList property DiseaseList Auto ; Build this in the CK by dragging the diseases in a formlist item.Spell Function PickRandomDisease() int N = DiseaseList.GetSize() return DiseaseList.GetAt(RandomInt(0,5)) ; DiseaseList contains Ataxia(0), BoneBreakFever(1), BrainRot(2), Rattles(3), Rockjoint(4) and WitBane(5)endEvent Whatevereventyou're usingtodothis Game.GetPlayer().AddSpell(PickRandomDisease())EndEvent