malonn Posted December 13, 2020 Share Posted December 13, 2020 I'm working with meshes that animate. I'm wondering if you can check the current state of a mesh via script? Specifically, I'm working with Harvest Containers and I'm curious if you can check to see which state the mesh is in--opened or closed? All via script. Link to comment Share on other sites More sharing options...
mixxa77 Posted December 13, 2020 Share Posted December 13, 2020 Judging by the description, this mod seems to do some scripting with a mesh, maybe this can help you in what you are trying to do: https://www.nexusmods.com/oblivion/mods/48882. Link to comment Share on other sites More sharing options...
malonn Posted December 13, 2020 Author Share Posted December 13, 2020 No, but thanks. That mod uses a separate mesh for the needle and it just moves it via SetPos. Link to comment Share on other sites More sharing options...
Pellape Posted December 14, 2020 Share Posted December 14, 2020 (edited) Maybe you can find something in this complete list of functions I really doubt it. I think you need to set a variable when onactivate but the thing is, how to unset that variable later as that is the tricky part. You could check in gamemode if there is something added to the container and then unset that variable. Maybe something like this?? Scn HarvetstContainer short state float timer ref Item Start OnActivate Set State to 1 end Start GameMode If ( State == 0 ) Return ; Do not waste fps... ;) Endif If ( Timer < 10 ) Set Timer to Timer + getSecondsPassed return ; Quitting this script as fast as possible Else ;GetItemCount <item> ; Or even better to use: GetInventoryObject 0 or 1 Set Item to GetInventoryObject 1 ; (or 0 but it does not always work) If ( Item != 00000000 ) ;Do what you wanna do here ;Do what you wanna do here ;Do what you wanna do here ;Do what you wanna do here Set State to 0 Endif Set Timer to 0 Endif Endif That bloody GetInventoryObject are tricky as it sometimes seems to pick itself -> the container, I use it twice if I use it and do something like this and also print the result to the console Set Iem00 to GetInventoryObject 0 Set Iem01 to GetInventoryObject 1 Printc "Item00 = %i & Item01 = %i", Item00, Item01 Edited December 14, 2020 by Pellape Link to comment Share on other sites More sharing options...
Recommended Posts