Jump to content

Help with Twinblades Script


Recommended Posts

Hi, Im testing my mod using Two blades. So far so good. Now i have used the Script of Jojjos Glaives to get the Blades Crossed on my back when i sheathe them. That Works too. But when im Pulling the Blades out again, then often the its like im drawing and sheathing the weapon agian and again. How long and when it occurs is randomly. I dont know why thats happening. When im using this Script with jojjos Glaives then it works. May the Mesh Cause the bug? Can Anyone help me please?

 

 

PS: Sorry for my bad english.

Link to comment
Share on other sites

Ok.

 

Script for The Main Blade:

 

scn HellfireBladeLeftScript

ref self
short doOnce

Begin GameMode


Set self to GetContainer

if ( doOnce == 2 )
	Set doOnce to 0
	Return
endif

if ( doOnce == 0 )
	Set doOnce to 0
	if ( self.IsActor == 1 && self.GetIsCreature != 1 && self.GetEquipped HellfireBladeLeft == 1 )
		Set doOnce to 1
	endif
	Return
endif

if ( self.GetEquipped HellfireBladeLeft == 1 && self.GetEquipped HellfireBladeRight == 1 )
	if ( self.IsWeaponOut == 0 )
		Message " "
		Message " "
		if ( self.GetItemCount HellfireBladesBack == 0 )
			self.AddItem HellfireBladesBack 1
		endif
		self.EquipItem HellfireBladesBack
		Set doOnce to 2
		return
	endif
endif

End

Begin Gamemode

Set self to GetContainer

If ( self.GetEquipped HellfireBladeLeft == 1 )
	If ( self.GetItemCount HellfireBladeRight == 0 )
		Message " "
		Message " "
		self.AddItem HellfireBladeRight 1
	endif
	Message " "
	Message " "
	self.EquipItem HellfireBladeRight
endif
		
End

Begin OnUnequip

Set self to GetContainer

If ( self.GetEquipped HellfireBladesBack == 0 )
	If ( self.GetEquipped HellfireBladeRight == 1)
		self.RemoveItem HellfireBladeRight 1
	endif
endif

End

 

And for the Blade on the back when i sheathe it

 

scn HellfirebladesBackScript


ref self
short doOnce

Begin MenuMode 1002

if ( doOnce == 2 )
	RemoveMe
	Return
endif

Set self to GetContainer
if ( self != Player && self != PlayerRef )
	Return
endif

if ( Player.GetEquipped HellfireBladesBack == 1 )
	if ( Player.GetEquipped HellfireBladeRight != 1 )
		Message " "
		Message " "
		Player.EquipItem HellfireBladeLeft
		Set doOnce to 2
	else
		Message " "
		Message " "
		Player.EquipItem HellfireBladeLeft
		Player.EquipItem HellfireBladeRight
		Set doOnce to 2
	endif
		
else
	RemoveMe
endif

End

Begin GameMode

Set self to GetContainer

if ( doOnce == 2 )
	RemoveMe
	Return
endif

if ( self.GetEquipped HellfireBladesBack == 1 )
	if ( self.IsWeaponOut == 1 )
		if ( self == Player || self == PlayerRef )
			Message " "
			Message " "
		endif
		self.EquipItem HellfireBladeLeft
		self.EquipItem HellfireBladeRight
		Set doOnce to 2
		Return
	endif
else
	RemoveMe
endif

End

 

like i said. the same script works without any clitches or bugs with the Glaives from Jojjo but with my Blades its buggy. But why?

Link to comment
Share on other sites

Yes they Are. Here the Originals:

 

Script One:

scn FenrirsBerserkerbladesBackScript


ref self
short doOnce

Begin MenuMode 1002

if ( doOnce == 2 )
	RemoveMe
	Return
endif

Set self to GetContainer
if ( self != Player && self != PlayerRef )
	Return
endif

if ( Player.GetEquipped FenrirsBerserkbladesBack == 1 )
	if ( Player.GetEquipped FenrirsFuryShield15 != 1 )
		Message " "
		Message " "
		Player.EquipItem FenrirsWrath15
		Set doOnce to 2
	else
		Message " "
		Message " "
		Player.EquipItem FenrirsWrath15
		Player.EquipItem FenrirsFuryShield15
		Set doOnce to 2
	endif
else
	RemoveMe
endif

End

Begin GameMode

Set self to GetContainer

if ( doOnce == 2 )
	RemoveMe
	Return
endif

if ( self.GetEquipped FenrirsBerserkbladesBack == 1 )
	if ( self.IsWeaponOut == 1 )
		if ( self == Player || self == PlayerRef )
			Message " "
			Message " "
		endif
		self.EquipItem FenrirsWrath15
		self.EquipItem FenrirsFuryShield15
		Set doOnce to 2
	endif
else
	RemoveMe
endif

End

 

Script Two:

scn FenrirsBerserkerbladeScript

ref self
short doOnce

Begin GameMode

Set self to GetContainer

if ( doOnce == 2 )
	Set doOnce to 0
	Return
endif

if ( doOnce == 0 )
	Set doOnce to 0
	if ( self.IsActor == 1 && self.GetIsCreature != 1 && self.GetEquipped FenrirsWrath15 == 1 )
		Set doOnce to 1
	endif
	Return
endif

if ( self.GetEquipped FenrirsWrath15 == 1 && self.GetEquipped FenrirsFuryShield15 == 1 )
	if ( self.IsWeaponOut == 0 )
		Message " "
		Message " "
		if ( self.GetItemCount FenrirsBerserkbladesBack == 0 )
			self.AddItem FenrirsBerserkbladesBack 1
		endif
		self.EquipItem FenrirsBerserkbladesBack
		Set doOnce to 2
	endif
endif

End

Begin Gamemode

Set self to GetContainer

If ( self.GetEquipped FenrirsWrath15 == 1 )
	If ( self.GetItemCount FenrirsFuryShield15 == 0)
		Message " "
		Message " "
		self.AddItem FenrirsFuryShield15 1
	endif
	Message " "
	Message " "
	self.EquipItem FenrirsFuryShield15
endif
		
End

Begin OnUnequip

Set self to GetContainer

If ( self.GetEquipped FenrirsBerserkbladesBack == 0 )
	If ( self.GetEquipped FenrirsFuryShield15 == 1)
		self.RemoveItem FenrirsFuryShield15 1
	endif
endif

End

 

Just the Blade Names Are Changed for my personal Mod

Edited by Black Zero 500
Link to comment
Share on other sites

Well... then I guess the only difference between how you did it and how the original mod did it, is that the script is attached to the right hand blade (sword) instead of the left hand blade (shield).

 

From looking at the scripts, I can tell these things about the original mod:

 

1. You can only ever find the right hand weapon (and only 1 of it) anywhere.

2. The blades on the back is (probably) a 2 handed weapon with a mesh that looks like crossed blades.

 

So is that true for your mod, especially the second one?

Link to comment
Share on other sites

Yes its true. That left right thingy yeah your right i namet it wrong, but its the right item. Just wrong names for the items. So the Left blade is in the right hand so that is ok. But when i draw the weapon the animation repeats itself sometimes. thats annoying
Link to comment
Share on other sites

Well, I don't think it'll help but you can try these scripts:

 

 

scn HellfireBladeRightScript

ref self

Begin GameMode

set self to GetContainer

;only has the right blade equipped
if (self.GetEquipped HellfireBladeRight == 1) && (self.GetItemCount HellfireBladeLeft == 0)
	Message " "
	Message " "
	self.AddItem HellfireBladeLeft 1
	self.EquipItem HellfireBladeLeft
endif

;both blades are equipped and sheathed
if (self.GetEquipped HellfireBladeRight == 1) && (self.GetEquipped HellfireBladeLeft == 1)
	if (self.IsWeaponOut == 0)
		Message " "
		Message " "
		self.AddItem HellfireBladesBack 1
		self.EquipItem HellfireBladesBack
		self.RemoveItem HellfireBladeLeft 1
		RemoveMe
	endif
endif

End

Begin MenuMode 1002

;remove the left blade when in inventory menu
if (self.GetItemCount HellfireBladeLeft > 0)
	Message " "
	Message " "
	self.RemoveItem HellfireBladeLeft 1
endif

End

Begin OnUnequip

;remove the left blade when the right blade is unequipped
if (self.GetItemCount HellfireBladeLeft > 0)
	Message " "
	Message " "
	self.RemoveItem HellfireBladeLeft 1
endif

End

 

scn HellfireBladesBackScript

ref self

Begin GameMode

;remove the crossed blades when weapons are drawn
if (self.GetEquipped HellfireBladesBack == 1)
	if (self.IsWeaponOut == 1)
		Message " "
		Message " "
		self.AddItem HellfireBladeLeft 1
		self.EquipItem HellfireBladeLeft
		self.AddItem HellfireBladeRight 1
		self.EquipItem HellfireBladeRight
		RemoveMe
	endif
endif

End

Begin MenuMode 1002

;remove the crossed blades when in inventory menu
if (self.GetEquipped HellfireBladesBack == 1)
	Message " "
	Message " "
	self.AddItem HellfireBladeLeft 1
	self.EquipItem HellfireBladeLeft
	self.AddItem HellfireBladeRight 1
	self.EquipItem HellfireBladeRight
	RemoveMe
endif

End

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

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