Can an absent actor use the Cast() function?

Post » Wed Jun 20, 2012 10:35 am

Okay, so the problem is that I need one spell to cast other spells in order to get paralyze and sleep effects and stuff to cast properly. But, the source in the cast function must be able to cast the spell, and therefore must have the spell. But these paralyze effects that are cast through scripts cost 0 mana, so if I give them to NPCs...well you get the idea.

So what I want to do is create an actor that I never place with all these spells named DungeonMaster and have him cast all the spells. Possible?
User avatar
Bird
 
Posts: 3492
Joined: Fri Nov 30, 2007 12:45 am

Post » Wed Jun 20, 2012 8:06 pm

If you don't want to have to worry about the animation of the cast, you can forgo those requirements by using the spell directly.

Spellname.Cast(akTarget, akSource)

Also check out remotecast. They don't need to have the spell to be capable of casting the spell. I think they just have to meet the MGEF requirements (if that). The note on the wiki indicating the source must be able to cast the spell seems a little misleading or I've done a heck of a job working around the problem without even realizing it.

-MM
User avatar
Taylah Illies
 
Posts: 3369
Joined: Fri Feb 09, 2007 7:13 am

Post » Wed Jun 20, 2012 6:53 pm

My game must be bugged then because when I use the Cast function, nobody has the spell and it still works properly. Not to mention it works perfectly fine even when I use something like a rock as the source.
User avatar
Scotties Hottie
 
Posts: 3406
Joined: Thu Jun 08, 2006 1:40 am

Post » Wed Jun 20, 2012 3:32 pm

RandomNoob, I agree with you. When casting the Spell I am not requirement bound. It just works. Just use SPELLNAME.CAST or SPELLNAME.REMOTECAST for your needs.

-MM
User avatar
Lynette Wilson
 
Posts: 3424
Joined: Fri Jul 14, 2006 4:20 pm

Post » Wed Jun 20, 2012 9:51 am

Baller.
User avatar
STEVI INQUE
 
Posts: 3441
Joined: Thu Nov 02, 2006 8:19 pm

Post » Wed Jun 20, 2012 7:11 pm

Heck, in the cell I Emailed you, I have floating balls casting sparks spells...http://www.creationkit.com/Complete_Example_Scripts#Script_to_make_an_item_cast_a_spell
User avatar
Emma Louise Adams
 
Posts: 3527
Joined: Wed Jun 28, 2006 4:15 pm


Return to V - Skyrim