Jump to content

Special spell needed


0magma0

Recommended Posts

i want to make a spell that does the following:

when the spell is casted for the first time on someone, that person will lose all it's fatigue and drop to the ground.

when the same spell is casted again on the same person, it will restore it's fatigue.

 

:thanks: anyway

Link to comment
Share on other sites

Easiest way to do this would be with a simple spell and ability combination.

 

 

 

 

First, make an ability that has a single effect of drain fatigue 5000 points. Name the ability something unique and save it.

 

Second, make a script as follows:

 

scn zyxxsimpleabilitytogglespellforfatigueSCRIPT

ref self

begin scripteffectstart
set self to getself
if self.isspelltarget <Form ID of ability> == 0
self.addspell <form ID of ability>
else
self.removespell <form ID of ability>
endif
end

 

Replace the "<form ID of ability>" with the form ID of the ability you made. Make sure you save it as a spell script (box in upper right of script window).

 

Then make your spell or power with a scripted spell effect that links to that script.

 

Now, since abilities are shared by the base actor, you will need to implement a failsafe so that if you kill anything affected by that ability, the ability will remove itself. Make another spell script as follows:

 

scn zyxxstandardremoveabilityondeathSCRIPT

ref self

begin scripteffectfinish
self.removespell <Form ID of ability>
end

 

Go back to the ability and add a new scripted spell effect which points to this script.

Link to comment
Share on other sites

Easiest way to do this would be with a simple spell and ability combination.

 

 

 

 

First, make an ability that has a single effect of drain fatigue 5000 points. Name the ability something unique and save it.

 

Second, make a script as follows:

 

scn zyxxsimpleabilitytogglespellforfatigueSCRIPT

ref self

begin scripteffectstart
set self to getself
if self.isspelltarget <Form ID of ability> == 0
self.addspell <form ID of ability>
else
self.removespell <form ID of ability>
endif
end

 

Replace the "<form ID of ability>" with the form ID of the ability you made. Make sure you save it as a spell script (box in upper right of script window).

 

Then make your spell or power with a scripted spell effect that links to that script.

 

Now, since abilities are shared by the base actor, you will need to implement a failsafe so that if you kill anything affected by that ability, the ability will remove itself. Make another spell script as follows:

 

scn zyxxstandardremoveabilityondeathSCRIPT

ref self

begin scripteffectfinish
self.removespell <Form ID of ability>
end

 

Go back to the ability and add a new scripted spell effect which points to this script.

 

this worked, thanks.

 

close pls?

Link to comment
Share on other sites

  • Recently Browsing   0 members

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