Jump to content

[Papyrus] Recieving a OnSpellCast Event


wilson212

Recommended Posts

Im currently in the process of making a mod for destruction. Essentially, you select a perk, and what this perk does is, when a destruction spell is cast, it increase the damage of the next destruction spell you cast by X%. My question is, i cant get this script to recieve an "OnSpellCast" event when attatched to the perk itself... So where can i attach this script too? Do i have to attach my script to every spell? Here is my script so far.

Scriptname ARC_IncantersFlowScript extends ReferenceAlias

Event OnSpellCast(Form akSpell)
    Debug.Notification("A spell was cast")
endEvent

When ever i cast a spell, i never receive the notification that a spell was cast.

Link to comment
Share on other sites

You are attaching the script to a perk, yet you are extending ReferenceAlias. Those two do not go together.

 

Try applying the script you have to the player alias on a quest. If the quest is start game enabled, add a check to ensure that the player has the perk before continuing with what you want the event to do.

Link to comment
Share on other sites

You are attaching the script to a perk, yet you are extending ReferenceAlias. Those two do not go together.

 

Try applying the script you have to the player alias on a quest. If the quest is start game enabled, add a check to ensure that the player has the perk before continuing with what you want the event to do.

 

Sounds like a plan Thanks :D

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...