Jump to content

Why wont this script work


JadeStoneX

Recommended Posts

I want to make a sword i made when it kills some one it gains 100 charge and says that the sword has absorbed their soul and it sets the enemy's corpse to being transparent and doesn't collide with anything except the ground.

 

Scn SoulFang

Ref Target
Ref Self

Begin ScriptEffectStart

Set target to Getself
Set self to Getself
End

Begin ScriptEffectUpdate

If ( Target.GetDead == 1)
Message "SoulFang has abosorbed a soul!"
Self.SetEnchantment == GetEnchantment + 100
Target.pms GhostEffect
Target.setghost 1
End

Link to comment
Share on other sites

Because spells end (Finish) when actors die and you're not changing anything at your sword and your not using it the right way. You would have to put your part that's within the update to the end (ScriptEffectFinish) to let it be processed. The other things is that you're moving it to the wrong way. Both Self and Target will point to the actor affected...as the spell takes effect on the actor...not the sword. Other than that, the SetEnchantment function allows you to replace an enchantment...it's not the charge-value, that's SetEquippedCurrentCharge
Link to comment
Share on other sites

  • Recently Browsing   0 members

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