Trainer script

Post » Mon Feb 25, 2013 8:53 am

Hi, I found the trainer script (TrainerGoldScript), and found it intersting:
There 2 properties, obviously the gold and the trainer type.
The script is:
Scriptname TrainerGoldScript extends Actorint Property TrainerType  Auto miscobject Property gold001  Auto Function CheckGold()int MaxGoldif TrainerType==1  MaxGold=500elseif TrainerType==2  MaxGold=800elseif TrainerType==3  MaxGold=1500else  MaxGold=500endifint GoldCount=GetItemCount(Gold001)if GoldCount > MaxGold  RemoveItem(Gold001, (GoldCount-MaxGold))endifEndFunctionEvent OnDetachedFromCell()CheckGold()EndEventEvent OnCellDetach()CheckGold()EndEvent

I Can't understand how the game knows how many time have you trained in that level, preventing more than 5 skill point per level?
There is nothing like a counter in this script, and I thought it was the easiest way to do this thing: a global value like "CurrentLevelTrainedPoint", and a script that at level passed make the global value = http://forums.bethsoft.com/topic/1445961-trainer-script/0.
Is my idea wrong?
User avatar
danni Marchant
 
Posts: 3420
Joined: Sat Oct 07, 2006 2:32 am

Return to V - Skyrim