Jump to content

[SOLUTION] Pinto plant not showing correct models


JustChill

Recommended Posts

The Pinto plant is a miracle.

 

Meshes appear to be alright even if I don't have much idea about them, but I installed NifSkope to compare it with meshes of other harvestable plants (activators).

 

They have a "Forward" and "Backward" model similar as the Pinto plant.

And in NifSkope it seems that the Pinto plant perfectly works when switching between Forward and Backward.

 

 

However, ingame the change doesn't work.

This is already an issue in the base game with vanilla Pinto plant activators.

 

So a good solution might be to use this:

scn PintoPickableScript

int State

ref rNewPintoPlant
float fScaleAmount

begin onActivate
    if State == 0 && GetActionRef == player
        player.additem <Pinto bean EditorID> <Amount>
        Let State := 1
        playGroup Forward 1 ;=> "This works, but after that it never go back to be fully grown and harvestable, even if it will be harvestable."
        setdestroyed 1                                        ;=> "It simply will look harvested all the time. No matter how often you use <PlayGroup Backward 1>"
    endif
end

begin onLoad
    if State                    ;=>"Not adding that here, as OnReset spawns a completely new plant. And if State is 0, the plant will be having the correct model."
        playGroup Forward 1   
    endif
end

begin onReset
    if State
        Let rNewPintoPlant := PlaceAtMe PintoPickable ;=> "So we rather plant a totally new Pinto plant that will show up as harvestable"
        Let fScaleAmount to GetScale  ;=> "Coordinates and Angle will be taken over, but scale not."
        rNewPintoPlant.SetScale fScaleAmount  ;=> "So we apply the scale of current plant onto new plant too."
        Let State := 0      ;=> "Just to be on the safe side. It will be disabled, but don't risk weird script running."
        Disable             ;=> "Like OnReset is firing another time oO If State is 0 nothing bad will happen. ;)"
        MarkForDelete          ;=> "Go away from game and savegame too!"
    endif
end

This solution is shamelessly stolen from the master himself:

https://forums.nexusmods.com/index.php?/topic/980220-making-a-harvestable-plant/&do=findComment&comment=7947546

Link to comment
Share on other sites

  • Recently Browsing   0 members

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