Jump to content

Papyrus Trouble


X14U2NVX

Recommended Posts

OK, So I'm new to Papyrus, and have been designing a personal mod for a shrink ray. Now, no matter how hard I try, I always end up mirroring Java and C, but anyways... here's my code:

 

Scriptname Growth extends activemagiceffect

 

Actor Property actor = GetTargetActor()

 

Event OnEffectStart

while true

actor.SetScale(actor.GetScale() - .1)

endwhile

EndEvent

 

Now, of course, there are compile errors, but because there are so few mods out there that are open source and deal with object properties, such as scale (or at least that I've been able to find).

The only ones that come close are the grow and shrink rays on the Skyrim Steam Workshop, but those are too abrupt and meh for me.

 

Basically, what this script is supposed to do is slowly decrement the scale value for the targeted actor (this is attached to a spell), thus making them shrink (rather smoothly) until a different script is activated (I've already written that one and had no trouble compiling).

 

Would appreciate any help, thanks in advance...

Link to comment
Share on other sites

Wich errors pop up when you try compiling?

 

First thing coming up is that you have to write the parameters for the event

Event OnEffectStart(Actor akTarget, Actor akCaster)

 

 

Thank you for your reply, but I am unable to do anything more with my mod because I have family illness and am abandoning the project. Maybe next time, but thanks.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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