Jump to content

Can someone tell me what is wrong with this script?


Videniofthesith

Recommended Posts

ref target

 

Begin ScriptEffectStart

target.getitemcount aaalighttoken 1

target.addspell aaafiredamage

End

Begin ScriptEffectUpdate

targetref.getitemcount aaalighttoken 0

target.addspell aaaBasicLight

End

Edited by Videniofthesith
Link to comment
Share on other sites

First things first, you need to set the target, as in (for example);

 

set Target to GetSelf

 

Second of all, your itemcount does nothing now. I'm not sure what you're trying to do here, but here are both ways;

 

set Var to Referance.GetItemCount Item > set a var to your itemcount for whatever reason...

if Referance.GetItemCount >= X > ask for a number of items... >= can ofcourse be replaced with whatever.

 

 

 

Lucifer

Link to comment
Share on other sites

Its suppose to be a spell that only affects a single creature race.

 

Cast the spell at target, if it has the token item (aaalighttoken) it cast the spell aaafiredamage

if the target don't have the token, it just causes the light spell.

 

When I try to save the script, it keeps saying "target" can't be used, "targetref" etc etc.

Link to comment
Share on other sites

One or the other;

scn Something

ref target

begin ScriptEffectStart
set Target to GetSelf
if Target.GetItemCount aaalighttoken > 0
target.addspell aaafiredamage
else
target.addspell aaaBasicLight
endif
end

Or both or the other;

scn Something

ref target

begin ScriptEffectStart
set Target to GetSelf
if Target.GetItemCount aaalighttoken > 0
target.addspell aaafiredamage
target.addspell aaaBasicLight
else
target.addspell aaaBasicLight
endif
end

As I am not sure which one you ment.

 

And you also have to consider, that this ADDS the spells. If they're abilities, they'll have effect. If they're spells, they need to be cast, otherwise all you're doing is giving them the spell to use (at will).

 

 

 

Lucifer

Link to comment
Share on other sites

Thank you for that, mine worked, but I think this one is less buggy. lol. Now if everything works as it should I will be able to upload the mod today. I am just praying that the getdistance and getincell quest stages activate when they should. -crosses fingers-
Link to comment
Share on other sites

and of course the get distance didn't work on aaamaggiedracon, but the getincell did. That is the last step, when you turn a corner it should activate stage 70, if a get distance from the target. But it didn't activate Edited by Videniofthesith
Link to comment
Share on other sites

  • Recently Browsing   0 members

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