Jump to content

Reset Havok Objects


kyd462

Recommended Posts

Hey everyone, I need some help with a script. I remember a mod that does exactly what I'm trying to do, but I can't find it anywhere. The mod added a carnival game where you knock down bottles, and then you could set them back up. That's what I need to do.

 

 

Here's what I'm trying to accomplish:

 

1. I need to link any number of havok objects to a single reference that can effect each linked ref through a script.

http://dl.dropbox.com/u/2961514/Help%20%26%20Tutorials/_01.jpg

 

2. The objects should work as normal, so the player can move them, or shoot them around the area.

http://dl.dropbox.com/u/2961514/Help%20%26%20Tutorials/_02.jpg

 

3. Then, once the player has left the area (or an activator is triggered), they reset back to their editor locations.

http://dl.dropbox.com/u/2961514/Help%20%26%20Tutorials/_01.jpg

 

 

I found a function "Reset3DState" that sounds like what I need, but I can't get it to work.

I've even tried attaching a script to each individual object (making them Activators - which I don't want to do), and it does nothing.

Since I can't get it to work on a single object, I haven't even tried writing a script that would send that command to every linked object yet.

I'm really stuck.

 

scn 000WGxHavokResetSCRIPT
short DoOnce
ref rMyself

Begin GameMode
If (DoOnce != 1)
	set rMyself to GetSelf
	set DoOnce to 1
EndIf
End

Begin OnActivate
rMyself.Reset3DState
;	Reset3DState rMyself    - tried it this way too
End

 

Also tried just this...

scn 000WGxHavokResetSCRIPT

Begin OnActivate
Reset3DState
End

 

I've tried this so many ways, but I don't want to bombard you with an essay. I figured I'll put it out there, and I'm sure you can all understand what I'm trying to do here. I just hope someone can help.

Link to comment
Share on other sites

From what I can gather by googling - the wiki isn't too informative, Reset3Dstate seems to be used for resetting an object that has an animation to it - like a container that opens, something that moves and needs to be reset before the anim playgroup can be played on it again.

 

You might be better off by getting the starting Posx, Posy, Posz, Angle Z, Angle Y, and Angle Z for each of the Gnomes beforehand. Then something to detect when the player has knocked them down. Then an activator to reset them when the player leaves the area, or reset them ONLOAD for the cell.

Link to comment
Share on other sites

From what I can gather by googling - the wiki isn't too informative, Reset3Dstate seems to be used for resetting an object that has an animation to it - like a container that opens, something that moves and needs to be reset before the anim playgroup can be played on it again.

 

You might be better off by getting the starting Posx, Posy, Posz, Angle Z, Angle Y, and Angle Z for each of the Gnomes beforehand. Then something to detect when the player has knocked them down. Then an activator to reset them when the player leaves the area, or reset them ONLOAD for the cell.

 

Yeah, after testing "Reset3Dstate" & "ResetInterior" many times now, in many different ways, I've determined that these functions don't work (or I don't understand how to use them)... I think your right about "Posx, Posy, Posz, Angle Z, Angle Y, and Angle Z"... That seems to be the consensus throughout the forums on this topic.

 

I may be close to a working solution now, but the real issue is that I intend to do this to over 100+ objects in an area, so it starts getting muddy no matter how you approach it.

 

Thank you for your reply! If you want to weigh in on the discussion in the other two forums (I'm not sure if I can link to them from here... against the rules?) Well, it's the same topic @ Bethesda and Underground Forums. I posted a concept script too.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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