IsFurnitureInUse() Not Registering

Post » Wed Jun 20, 2012 5:47 am

Hi everybody, I'm currently working on a mod that will allow the player to carry around a whetstone in order to make limited improvements to their weapons on the go. Many of you have helped me with previous issues, but I have one last hurdle before this is ready for release.

Here is the script for the whetstone:

Scriptname AAATestScript extends ObjectReferenceEvent OnEquipped(Actor akActor)     Game.DisablePlayerControls(false, false, false, false, false, true, false)          utility.wait(0.1)     Game.EnablePlayerControls(false, false, false, false, false, true, false)     Game.GetPlayer().ModActorValue("smithingmod",  -50)     utility.wait(0.5)     stoneBase.Activate(Game.GetPlayer())     utility.wait(5)     if  stoneBase.IsFurnitureInUse()          Debug.messagebox("Still Crafting")             utility.wait(10)          Debug.messagebox("True")     else         Debug.messagebox("False")    endIfEndEventObjectReference Property stoneBase Auto


The script works perfectly, modifying the smithingmod attribute and activating a crafting station. However, the last section of the code is currently set up to debug what is going on, and...

     if  stoneBase.IsFurnitureInUse()			  Debug.messagebox("Still Crafting")  		  utility.wait(10)		           Debug.messagebox("True")	    else		          Debug.messagebox("False")    endIf
...always return FALSE even when I am still in the crafting menu. Now, I assume this is because the furniture is activated remotely via another script, but I need a way to detect when the crafting menu is no longer open, so that I can reset the players smithingmod attribute to it's original value when the menu closes.

The only way I can think to do it is pop up a message box every 15 seconds or so to ask the player if he is done crafting, but that feels very cumbersome.

I also thought about using placeatme to place the crafting station in front of the player and then forcing the player to activate it, but I haven't yet been successful in figuring out just how placeatme works(the wiki is a little vague). I think that this would be the best solution because eventually I hope to create a custom animation of the player sharpening their sword, so attaching that animation to a custom (invisible) crafting station and placing the station in front of the character would kill two birds with one stone.

If anyone could offer any help with either IsFurnitureInUse() or placeatme, I would really appreciate it.

Thanks,
d_b
User avatar
Rachael Williams
 
Posts: 3373
Joined: Tue Aug 01, 2006 6:43 pm

Post » Wed Jun 20, 2012 12:55 pm

Bump, Anyone?
User avatar
rae.x
 
Posts: 3326
Joined: Wed Jun 14, 2006 2:13 pm


Return to V - Skyrim