Jump to content

Scripts not beeing applied correctly?


Hexogen

Recommended Posts

So i made my first script, just to test something.

 

I edited the MS39NirnrootPlantScript (The actual script that is called upon plant harvest) so all plants are 10 times as large, script is as follows:

 

begin GameMode

short DisabledByHarvest

Disable

SetScaleEX 10

if (DisabledByHarvest != 1)

Enable

endif

end

 

begin OnActivate

Activate

Disable

set DisabledByHarvest to 1

end

 

 

But somehow, some plants arent affected by it, while others are.

Someone knows why? Or do i need a cell reset? Or what seems to be the problem?

 

My initial plan was to make a spell like detect life to use on nirnroots, but since i cant figure shader and spell effects, i just increased their size :S

Link to comment
Share on other sites

There seems little point in the harvest check, since it's a blanket scaling, yes? Try:

 

short doonce

 

begin GameMode

if ( doonce == 0 )

Disable

SetScaleEX 10

Enable

set doonce to 1

endif

end

 

begin OnActivate

Activate

Disable

end

Link to comment
Share on other sites

There seems little point in the harvest check, since it's a blanket scaling, yes? Try:

 

short doonce

 

begin GameMode

if ( doonce == 0 )

Disable

SetScaleEX 10

Enable

set doonce to 1

endif

end

 

begin OnActivate

Activate

Disable

end

 

Yeah well but its not setting the scale correctly. By the way, after more investigation, looking at a small nirnroot, quicksave, quickload, will make it big, but i have to do that in EVERY new cell i get in in order to size the nirnroots, although the size is in the Gamemode block without and if statements, wich should be run every game frame while its active, still it doesnt work >.>

 

I guess its just a problem with the way the game load already known information :S

Link to comment
Share on other sites

Do I understand you correctly. Are you saying that you took out the If/EndIf statements? The whole point of that, is that it will only run ONCE (hence the doonce variable). The Disable is essential before you rescale, else the rescale won't be updated on the fly -- the same effect as you quicksaving/loading. The script as written should work fine.
Link to comment
Share on other sites

Do I understand you correctly. Are you saying that you took out the If/EndIf statements? The whole point of that, is that it will only run ONCE (hence the doonce variable). The Disable is essential before you rescale, else the rescale won't be updated on the fly -- the same effect as you quicksaving/loading. The script as written should work fine.

 

Nah i didnt take out the if's.

 

Anyways, since i couldnt figure out why it didnt work, i just edited the mesh >.>

Link to comment
Share on other sites

  • Recently Browsing   0 members

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