How to cast spell on player when there is no trigger or cast

Post » Tue Jun 19, 2012 4:57 pm

Function Cast(ObjectReference akSource, ObjectReference akTarget)

how do I apply that to the player from a script?
i've tried everyting I can think of for the "player" variable in the onupdate event
Scriptname myQuest extends QuestSpell property DiseaseAtaxia autoEvent OnInit()RegisterForUpdate(1)EndEventEvent OnUpdate()player =  DiseaseAtaxia.Cast(player?, player)EndEvent
User avatar
BrEezy Baby
 
Posts: 3478
Joined: Sun Mar 11, 2007 4:22 am

Post » Tue Jun 19, 2012 4:49 pm

try using AddSpell instead of Cast
User avatar
El Goose
 
Posts: 3368
Joined: Sun Dec 02, 2007 12:02 am

Post » Tue Jun 19, 2012 9:55 am

Thanks - I have tried that , but that adds a spell to a players spellbook. Anyone else on the nite crew have any suggestions?
User avatar
Ian White
 
Posts: 3476
Joined: Thu Jul 19, 2007 8:08 pm

Post » Tue Jun 19, 2012 1:42 am

Thanks - I have tried that , but that adds a spell to a players spellbook. Anyone else on the nite crew have any suggestions?

Adds a spell or an ability. Don't diseases act like abilities?
User avatar
Amie Mccubbing
 
Posts: 3497
Joined: Thu Aug 31, 2006 11:33 pm

Post » Tue Jun 19, 2012 11:25 am

PlayerRef.addSpell( TrapDiseaseAtaxia, False )
User avatar
Matt Fletcher
 
Posts: 3355
Joined: Mon Sep 24, 2007 3:48 am


Return to V - Skyrim