Jump to content

How would I go about scripting the following?


Akatosh2903

Recommended Posts

I think I'm on to something now but I've hit an annoying snag, what's a nested begin/end block and how do I prevent it?

 

In theory if I create this script as an effect, and use it as an "on death" effect for a weapon, I won't have to do so much coding.

 

ScriptName HalfZatoichiHeal

begin ScriptEffectStart

player.SetAV health +30

begin ScriptEffectFinish

Edited by Akatosh2903
Link to comment
Share on other sites

New problem, I think I've fixed the nested begin/end block problem but know it says that I haven't defined the parameter amount

 

 

ScriptName HalfZatoichiHeal

begin ScriptEffectStart
player.SetAV health +30
end ScriptEffectStart

Edited by Akatosh2903
Link to comment
Share on other sites

I've added another element to the script, I'm trying to heal the PC by 30 points but only if their karma level is above 249 (good).

 

 

ScriptName HalfZatoichiHeal

begin ScriptEffectStart
if player GetAV Karma > 249
 player.ModAV health 340
else
 player.ModAV health -40
endif
end ScriptEffectStart

Edited by Akatosh2903
Link to comment
Share on other sites

Revised but untested.

0HalfZatoichiHeal1 heals the player for 20 points if they have a good karma level.

0HalfZatoichiHeal2 heals the player for 40 points if they have a very good karma level.

0HalfZatoichiHurt1 damages the player for 20 points if they have a bad karma level.

0HalfZatoichiHurt2 damages the player for 40 points if they have a very bad karma level.

0HalfZatoichiRadBurst causes the player to emit a glowing one's rad burst if they have a neutral karma level.

 

 

ScriptName HalfZatoichiHealHurt

begin ScriptEffectStart
if player GetAV Karma >= 250 && < 750
 player.CastImmediateOnSelf 0HalfZatoichiHeal1
endif

if player GetAV Karma >= 750
  player.CastImmediateOnSelf 0HalfZatoichiHeal2
endif

if player GetAV Karma > -250 && < 250
 player.CastImmediateOnSelf 0HalfZatoichiRadBurst
endif

if player GetAV Karma <= -250 && > -750
  player.CastImmediateOnSelf 0HalfZatoichiHurt1
endif

if player GetAV Karma <= -750
  player.CastImmediateOnSelf 0HalfZatoichiHurt2
endif

end ScriptEffectStart

Edited by Akatosh2903
Link to comment
Share on other sites

Revised Script Tested.

This script was attached to a weapon, it didn't work, my doubts lies with line 4 "if IsKiller player", I think if I found a good alternative to that line, It would work.

 

 

ScriptName HalfZatoichiHealHurt

begin ScriptEffectStart
if IsKiller player
 if player GetAV Karma >= 250 && < 750
   player.CastImmediateOnSelf 0HalfZatoichiHeal1
  endif

  if player GetAV Karma >= 750
    player.CastImmediateOnSelf 0HalfZatoichiHeal2
  endif

  if player GetAV Karma > -250 && < 250
   player.CastImmediateOnSelf 0HalfZatoichiRadBurst
  endif

  if player GetAV Karma <= -250 && > -750
    player.CastImmediateOnSelf 0HalfZatoichiHurt1
  endif

  if player GetAV Karma <= -750
    player.CastImmediateOnSelf 0HalfZatoichiHurt2
  endif
endif
end ScriptEffectStart

Edited by Akatosh2903
Link to comment
Share on other sites

  • Recently Browsing   0 members

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