Jump to content

Help to create a new little mod.


SKYPSX

Recommended Posts

It's relatively simple but you will still need to create two or three spells (depending on implementation), two to three spell effects, and write at least one script. I'm making some screenshots and I want to test my method but I will get back to you as soon as I know if it will work. Tomorrow most likely, next day at the latest.

Link to comment
Share on other sites

While there may be a better way to do this, you could try this tutorial on the CK Wiki, since it does something pretty similar to what you want. Then, you change the monitor script to something like this:

Scriptname MonitorScript extends ActiveMagicEffect  
 
Actor Property PlayerREF Auto
Actor MySelf
 
Event OnEffectStart(Actor akTarget, Actor akCaster)

	RegisterForSingleUpdate(0.25)
        MySelf = akTarget

EndEvent
 
Event OnUpdate()

	RegisterForSingleUpdate(0.25)

EndEvent
 
Event OnEffectFinish(Actor akTarget, Actor akCaster)

	UnregisterForUpdate()

EndEvent
 
Event OnDeath(Actor AkKiller)

     If AkKiller == PlayerREF

          PlayerREF.RestoreAV(10); set 10 to however much you want to restore the player's health

     EndIf

EndEvent

The issue is I'm not sure if OnDeath works in an ActiveMagicEffect script (I don't think it does...), and there's no way to tell the script - that I know of - that MySelf is the one who died. Since the script isn't attached to the person who died, I'm not sure how I would go about doing this. The script might end up looking something like the above script though. I haven't worked with Dynamically Attaching Scripts a bunch, so I might be entirely wrong.

Link to comment
Share on other sites

 

While there may be a better way to do this, you could try this tutorial on the CK Wiki, since it does something pretty similar to what you want. Then, you change the monitor script to something like this:

Scriptname MonitorScript extends ActiveMagicEffect  
 
Actor Property PlayerREF Auto
Actor MySelf
 
Event OnEffectStart(Actor akTarget, Actor akCaster)

	RegisterForSingleUpdate(0.25)
        MySelf = akTarget

EndEvent
 
Event OnUpdate()

	RegisterForSingleUpdate(0.25)

EndEvent
 
Event OnEffectFinish(Actor akTarget, Actor akCaster)

	UnregisterForUpdate()

EndEvent
 
Event OnDeath(Actor AkKiller)

     If AkKiller == PlayerREF

          PlayerREF.RestoreAV(10); set 10 to however much you want to restore the player's health

     EndIf

EndEvent

The issue is I'm not sure if OnDeath works in an ActiveMagicEffect script (I don't think it does...), and there's no way to tell the script - that I know of - that MySelf is the one who died. Since the script isn't attached to the person who died, I'm not sure how I would go about doing this. The script might end up looking something like the above script though. I haven't worked with Dynamically Attaching Scripts a bunch, so I might be entirely wrong.

Thank you very much. I'll try. When I get it I will post in Nexus.

Edited by SKYPSX
Link to comment
Share on other sites

  • Recently Browsing   0 members

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