This should be simple but I am kinda stumped...

Post » Tue Jun 19, 2012 2:58 am

*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...
User avatar
Mizz.Jayy
 
Posts: 3483
Joined: Sat Mar 03, 2007 5:56 pm

Post » Tue Jun 19, 2012 1:26 am

*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
User avatar
naana
 
Posts: 3362
Joined: Fri Dec 08, 2006 2:00 pm

Post » Mon Jun 18, 2012 1:43 pm

woah, ok thanks... that looks way different than I was expecting it to be!

Thank you :)
User avatar
Adam Porter
 
Posts: 3532
Joined: Sat Jun 02, 2007 10:47 am

Post » Mon Jun 18, 2012 9:25 pm

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)end
You created a variable for the list size and never used it :cryvaultboy:
User avatar
My blood
 
Posts: 3455
Joined: Fri Jun 16, 2006 8:09 am

Post » Tue Jun 19, 2012 2:31 am

Sorry to drag this one back up but its the last task I have before I officially have a fully playable alpha of THS.
I try to add diseases but something strange happens where the disease is randomly garbled with no discription. Sometimes the disease appears perfectly fine sometimes it does not at all... Its really freakin strange...
User avatar
Anthony Rand
 
Posts: 3439
Joined: Wed May 09, 2007 5:02 am

Post » Tue Jun 19, 2012 2:04 am

crap, I am exhausted from scripting this mod and this is the last thing I need to get working and nothing seems to be working correctly... :(
User avatar
Manny(BAKE)
 
Posts: 3407
Joined: Thu Oct 25, 2007 9:14 am


Return to V - Skyrim