scn XanderRootScriptint Statebegin onActivate if State == 0 && GetActionRef == player player.additem XanderRoot 1 set State to 1 playGroup Backward 1 setdestroyed 1 endifendbegin onLoad if State == 0 playGroup Forward 1 elseif State == 1 playGroup Backward 1 endifendbegin onReset if State == 1 playgroup Forward 1 set State to 0 setdestroyed 0 endifend
Now to the problem. I have created a new script for them that i attached to the activators, replacing the above code entirely. Now, everything works fine untill a certain condition is met.
If i picked a plant somewhere, went on with my game, then activate my mod (replacing the script) and then came to the plant again that i had already picked, it's PlayGroup animation is reversed. I see a "picked" plant, yet i can pick it and it gets "un-picked". Ofcourse this aint right.
As far as i know the problem has to do with the fact that i replaced the script and the "state" variable. In that they get mixed up. If i pick a plant in the vanilla game the state gets set to 1 and the plant plays the forward animation. But since i use my mod the state variable is now 0, yet it still plays the forward animation. hence it being reversed. At least, that's what i think is going on.
The problem is that i have no idea how to solve it, i tried many things, but nothing seems to work.
Can anyone tell me how i can "reset" the plant status when my mod is loaded, in that it's a normal "pickable" plant.
