Need script help.How to add a new spell to player

Post » Fri Jul 11, 2014 9:05 am

Hi guys, i am a beginner of papyrus script. i want to use script to add a new spell to my character in a particular time, lets say 8 pm. how to do it?

i already know the function checking the time,but dont konw how to add a spell to player. anyone knows how to do it?

here is the code

Spoiler
float Function GetCurrentHourOfDay() global

float Time = Utility.GetCurrentGameTime()
Time -= Math.Floor(Time) ; Remove "previous in-game days passed" bit
Time *= 24 ; Convert from fraction of a day to number of hours
Return Time

EndFunction

if getCurrentHourOfDay() == 8
{add spell to player}

many thanks

User avatar
Hot
 
Posts: 3433
Joined: Sat Dec 01, 2007 6:22 pm

Post » Fri Jul 11, 2014 4:33 am

http://www.creationkit.com/AddSpell_-_Actor

Game.GetPlayer().AddSpell(YourSpellProperty)
User avatar
Noraima Vega
 
Posts: 3467
Joined: Wed Jun 06, 2007 7:28 am


Return to V - Skyrim