Jump to content

Strange Mannequin Bug


Albino Penguin

Recommended Posts

Well, I've been working on a castle mod on-and-off for a while now, but there's one bug that I haven't been able to work out of the system.

 

I've created some fairly basic stationary mannequins (not becuase Reznods aren't great, but I like to be pedantic and do everything myself), and everything works fine, apart from the head.

 

For some inexplicable reason, when I place any item that uses the Head/Hair slot in the mannequin the hair completely disappears (and doesn't show the forementioned item, leaving a bald, helmet-less mannequin). On entering the mannequin again it displays everything correctly (till the cell is loaded again).

 

Not the biggest bug in the word, but definately an annoyance.

 

So, if anyone can point out where I've gone wrong, here is my script:

 

scn RDModelScript

Short DoOnce
Short Flag1
ref Mannequin

Begin OnActivate
Set Mannequin to GetSelf
Removeallitems RDMannequinRef1;The empty container
Set Flag1 to 1
RDMannequinRef1.activate Player;Opens the container
SetActorsai 1
End

Begin Gamemode
if DoOnce == 0
	setghost 1
	setunconscious 1
	setActorsai 0
	set doonce to 1
endif
If Flag1 == 1
	Set Flag1 to 0
	RDMannequinRef1.removeallitems Mannequin
	Mannequin.additem RDMannequinrRobe 1;Robe effects all slots
	Mannequin.equipitem RDMannequinrRobe
	Mannequin.removeitem RDMannequinrRobe 1
	Set DoOnce to 0
endif
end

 

Previous testing shows the bug persists regardless of whether the 'RDMannequinrRobe' has a head slot or not, and persists if a seperate item is used for the head slot (and then removed).

 

All help is greatly appreciated.

Link to comment
Share on other sites

Scratch that.

 

Apparently Oblivion needed an extra second with AI turned on to sort out the head.

 

If anyone cares, finished script:

 

scn RDModelScript

Short DoOnce
Short Flag1
ref Mannequin
Float Timer

Begin OnActivate
Set Mannequin to GetSelf
Removeallitems RDMannequinRef1
Set Flag1 to 1
RDMannequinRef1.activate Player
Set Timer to 1
SetActorsai 1
End

Begin Gamemode
if DoOnce == 0
	setghost 1
	SetUnconscious 1
	set doonce to 1
	setActorsai 0
	Else
		If DoOnce == 2
			If Timer > 0
				Set Timer to Timer - GetSecondsPassed
				SkipAnim				
			Else
				SetActorsai 0
				Set DoOnce to 1
			Endif
	endif
Endif
If Flag1 == 1
	Set Flag1 to 0
	RDMannequinRef1.removeallitems Mannequin
	Mannequin.additem RDMannequinrRobe 1
	Mannequin.equipitem RDMannequinrRobe
	Mannequin.removeitem RDMannequinrRobe 1
	Set DoOnce to 2
endif
end

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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