Jump to content

My first Script / Of course it does not work! :-P


christianerding

Recommended Posts

Hello Scripters,

 

I wanted to write a script that increases barter by one point PERMANENTLY.

So I did stick the script on the chem-effect of mentats.

Each time I use one pill it should run once and then end.

But regardless how hard I try it does not do ANYTHING.

On Activate will not work either, it gives the bonus on Pickup the pills instead of ingestion! :-(

 

Can somebody help me?

 

Maybe I should take a few mentats, too? :-P

 

 

 

scn BarterScript

 

short DoOnce

 

begin OnMagicEffectHit ChemIncPEMentats

if IsActionRef player == 1

 

if ( DoOnce == 0 )

if ( Player.GetPermanentActorValue Barter < 100 )

Player.ModAv Barter 1

 

endif

Activate

 

Set DoOnce to 1

endif

 

endif

end

Edited by christianerding
Link to comment
Share on other sites

I dunno what you are trying to do there but if I were you, I would do it like this:

 

Create a new Base Effect and point it to an effect script.

 

<Effect Script>

scn BarterUpgradeScript

 

short initBarter;

 

BEGIN ScriptEffectStart

set initBarter to GetAV Barter

SetAV Barter (initBarter + 1)

END

 

And add the base effect to the list of effects in the "Spell" associated with Mentats. Or any other ingestible.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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