Jump to content

Photo

what is wrong :GetEquippedArmorInSlot

getequippedarmorinslot

  • Please log in to reply
6 replies to this topic

#1
pxd2050

pxd2050

    Journeyman

  • Members
  • Pip
  • 26 posts
Function BackupOutfit()
	BK_ArmorSlot01 = self.GetActorRef().GetEquippedArmorInSlot(30)
	BK_ArmorSlot02 = self.GetActorRef().GetEquippedArmorInSlot(31)
	BK_ArmorSlot03 = self.GetActorRef().GetEquippedArmorInSlot(32)
	BK_ArmorSlot04 = self.GetActorRef().GetEquippedArmorInSlot(33)
	BK_ArmorSlot05 = self.GetActorRef().GetEquippedArmorInSlot(34)
	BK_ArmorSlot06 = self.GetActorRef().GetEquippedArmorInSlot(35)
	BK_ArmorSlot07 = self.GetActorRef().GetEquippedArmorInSlot(36)
	BK_ArmorSlot08 = self.GetActorRef().GetEquippedArmorInSlot(37)
	BK_ArmorSlot09 = self.GetActorRef().GetEquippedArmorInSlot(38)
	BK_ArmorSlot10 = self.GetActorRef().GetEquippedArmorInSlot(39)
	BK_ArmorSlot11 = self.GetActorRef().GetEquippedArmorInSlot(40)
	BK_ArmorSlot12 = self.GetActorRef().GetEquippedArmorInSlot(41)
	BK_ArmorSlot13 = self.GetActorRef().GetEquippedArmorInSlot(42)
	BK_ArmorSlot14 = self.GetActorRef().GetEquippedArmorInSlot(43)
	BK_ArmorSlot15 = self.GetActorRef().GetEquippedArmorInSlot(44)
	BK_ArmorSlot16 = self.GetActorRef().GetEquippedArmorInSlot(45)
	BK_ArmorSlot17 = self.GetActorRef().GetEquippedArmorInSlot(46)
	BK_ArmorSlot18 = self.GetActorRef().GetEquippedArmorInSlot(47)
	BK_ArmorSlot19 = self.GetActorRef().GetEquippedArmorInSlot(48)
	BK_ArmorSlot20 = self.GetActorRef().GetEquippedArmorInSlot(49)
	BK_ArmorSlot21 = self.GetActorRef().GetEquippedArmorInSlot(52)
	BK_ArmorSlot22 = self.GetActorRef().GetEquippedArmorInSlot(53)
	BK_ArmorSlot23 = self.GetActorRef().GetEquippedArmorInSlot(54)
	BK_ArmorSlot24 = self.GetActorRef().GetEquippedArmorInSlot(55)
	BK_ArmorSlot25 = self.GetActorRef().GetEquippedArmorInSlot(56)
	BK_ArmorSlot26 = self.GetActorRef().GetEquippedArmorInSlot(57)
	BK_ArmorSlot27 = self.GetActorRef().GetEquippedArmorInSlot(58)
	BK_ArmorSlot28 = self.GetActorRef().GetEquippedArmorInSlot(59)
	BK_ArmorSlot29 = self.GetActorRef().GetEquippedArmorInSlot(60)
	Debug.notification("BackupOutfit:")
	debug.notification(BK_ArmorSlot01)
	debug.notification(BK_ArmorSlot03)
	debug.notification(BK_ArmorSlot05)
	debug.notification(BK_ArmorSlot09)
	debug.notification(BK_ArmorSlot11)
	debug.notification(BK_ArmorSlot15)
	debug.notification(BK_ArmorSlot19)
	debug.notification(BK_ArmorSlot21)
	debug.notification(BK_ArmorSlot25)
	debug.notification(BK_ArmorSlot29)
EndFunction

Function RestoreOutfit()
	self.GetActorRef().EquipItem(BK_ArmorSlot01)
	self.GetActorRef().EquipItem(BK_ArmorSlot02)
	self.GetActorRef().EquipItem(BK_ArmorSlot03)
	self.GetActorRef().EquipItem(BK_ArmorSlot04)
	self.GetActorRef().EquipItem(BK_ArmorSlot05)
	self.GetActorRef().EquipItem(BK_ArmorSlot06)
	self.GetActorRef().EquipItem(BK_ArmorSlot07)
	self.GetActorRef().EquipItem(BK_ArmorSlot08)
	self.GetActorRef().EquipItem(BK_ArmorSlot09)
	self.GetActorRef().EquipItem(BK_ArmorSlot10)
	self.GetActorRef().EquipItem(BK_ArmorSlot11)
	self.GetActorRef().EquipItem(BK_ArmorSlot12)
	self.GetActorRef().EquipItem(BK_ArmorSlot13)
	self.GetActorRef().EquipItem(BK_ArmorSlot14)
	self.GetActorRef().EquipItem(BK_ArmorSlot15)
	self.GetActorRef().EquipItem(BK_ArmorSlot16)
	self.GetActorRef().EquipItem(BK_ArmorSlot17)
	self.GetActorRef().EquipItem(BK_ArmorSlot18)
	self.GetActorRef().EquipItem(BK_ArmorSlot19)
	self.GetActorRef().EquipItem(BK_ArmorSlot20)
	self.GetActorRef().EquipItem(BK_ArmorSlot21)
	self.GetActorRef().EquipItem(BK_ArmorSlot22)
	self.GetActorRef().EquipItem(BK_ArmorSlot23)
	self.GetActorRef().EquipItem(BK_ArmorSlot24)
	self.GetActorRef().EquipItem(BK_ArmorSlot25)
	self.GetActorRef().EquipItem(BK_ArmorSlot26)
	self.GetActorRef().EquipItem(BK_ArmorSlot27)
	self.GetActorRef().EquipItem(BK_ArmorSlot28)
	self.GetActorRef().EquipItem(BK_ArmorSlot29)
	Debug.notification("RestoreOutfi:")
	debug.notification(BK_ArmorSlot01)
	debug.notification(BK_ArmorSlot03)
	debug.notification(BK_ArmorSlot05)
	debug.notification(BK_ArmorSlot09)
	debug.notification(BK_ArmorSlot11)
	debug.notification(BK_ArmorSlot15)
	debug.notification(BK_ArmorSlot19)
	debug.notification(BK_ArmorSlot21)
	debug.notification(BK_ArmorSlot25)
	debug.notification(BK_ArmorSlot29)
endfunction 

How to backup and restore the initial Outfit ?it don't work 

debug dispaly:none


Edited by pxd2050, 31 July 2020 - 07:45 PM.


#2
IsharaMeradin

IsharaMeradin

    The Pale Redguard

  • Members
  • PipPipPipPipPip
  • 8,827 posts

GetEquippedArmorInSlot is an SSE exclusive function (see Actor script for details).  You cannot use it with LE.

 

That begs the question, are you working with LE or SSE?  I ask because the code is for SSE and this forum thread is in the LE section.



#3
pxd2050

pxd2050

    Journeyman

  • Members
  • Pip
  • 26 posts

GetEquippedArmorInSlot is an SSE exclusive function (see Actor script for details).  You cannot use it with LE.

 

That begs the question, are you working with LE or SSE?  I ask because the code is for SSE and this forum thread is in the LE section.

thank you very much. this is work  for SSE,What to do if forum thread can't use in SSE?

Scriptname outfit__script extends ReferenceAlias  

import debug
import utility

Event OnDeath(Actor akKiller)
	ClearBuffer()
   	 self.clear()
endEvent

Form Property WeaponSlot01 auto hidden
Form Property WeaponSlot02 auto hidden
Form Property WeaponSlot03 auto hidden

Form Property ArmorSlot01 auto hidden
Form Property ArmorSlot02 auto hidden
Form Property ArmorSlot03 auto hidden
Form Property ArmorSlot04 auto hidden
Form Property ArmorSlot05 auto hidden
Form Property ArmorSlot06 auto hidden
Form Property ArmorSlot07 auto hidden
Form Property ArmorSlot08 auto hidden
Form Property ArmorSlot09 auto hidden
Form Property ArmorSlot10 auto hidden

Form Property BK_ArmorSlot01 auto hidden
Form Property BK_ArmorSlot02 auto hidden
Form Property BK_ArmorSlot03 auto hidden
Form Property BK_ArmorSlot04 auto hidden
Form Property BK_ArmorSlot05 auto hidden
Form Property BK_ArmorSlot06 auto hidden
Form Property BK_ArmorSlot07 auto hidden
Form Property BK_ArmorSlot08 auto hidden
Form Property BK_ArmorSlot09 auto hidden
Form Property BK_ArmorSlot10 auto hidden
Form Property BK_ArmorSlot11 auto hidden
Form Property BK_ArmorSlot12 auto hidden
Form Property BK_ArmorSlot13 auto hidden
Form Property BK_ArmorSlot14 auto hidden
Form Property BK_ArmorSlot15 auto hidden
Form Property BK_ArmorSlot16 auto hidden
Form Property BK_ArmorSlot17 auto hidden
Form Property BK_ArmorSlot18 auto hidden
Form Property BK_ArmorSlot19 auto hidden
Form Property BK_ArmorSlot20 auto hidden
Form Property BK_ArmorSlot21 auto hidden
Form Property BK_ArmorSlot22 auto hidden
Form Property BK_ArmorSlot23 auto hidden
Form Property BK_ArmorSlot24 auto hidden
Form Property BK_ArmorSlot25 auto hidden
Form Property BK_ArmorSlot26 auto hidden
Form Property BK_ArmorSlot27 auto hidden
Form Property BK_ArmorSlot28 auto hidden
Form Property BK_ArmorSlot29 auto hidden

Form Property EmptySlot auto hidden

EVENT OnCellLoad()
	wait(0.25)
	EquipCurrentArmor()
	EquipCurrentWeapon()
EndEVENT

EVENT OnLoad()
	wait(0.25)
	EquipCurrentArmor()
	EquipCurrentWeapon()
EndEVENT

EVENT OnEnable()
	EquipCurrentArmor()
	EquipCurrentWeapon()
endEVENT

Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)
	if (akBaseItem as Armor) 
		AddToArmorSlot(akBaseItem)
		self.GetActorRef().EquipItem(akBaseItem)
	elseif (akBaseItem as Weapon)
		AddToWeaponSlot(akBaseItem)
		self.GetActorRef().EquipItem(akBaseItem)
	endif
endEvent

Event OnObjectUnequipped(Form akBaseObject, ObjectReference akReference)
	if (akBaseObject as Armor)
		RemoveFromArmorSlot(akBaseObject)
	elseif  (akBaseObject as Weapon)
		RemoveFromWeaponSlot(akBaseObject)
	endif
endEvent

Function ClearBuffer()
	ArmorSlot01 = EmptySlot
	ArmorSlot02 = EmptySlot
	ArmorSlot03 = EmptySlot
	ArmorSlot04 = EmptySlot
	ArmorSlot05 = EmptySlot
	ArmorSlot06 = EmptySlot
	ArmorSlot07 = EmptySlot
	ArmorSlot08 = EmptySlot
	ArmorSlot09 = EmptySlot
	ArmorSlot10 = EmptySlot
	WeaponSlot01 = EmptySlot
	WeaponSlot02 = EmptySlot
	WeaponSlot03 = EmptySlot
EndFunction

Function EquipCurrentArmor()
	if self.GetActorRef() == None
		Return
	Endif
	if (ArmorSlot01 != EmptySlot)
		self.GetActorRef().EquipItem(ArmorSlot01)
	endif
	if (ArmorSlot02 != EmptySlot)
		self.GetActorRef().EquipItem(ArmorSlot02)
	endif
	if (ArmorSlot03 != EmptySlot)
		self.GetActorRef().EquipItem(ArmorSlot03)
	endif
	if (ArmorSlot04 != EmptySlot)
		self.GetActorRef().EquipItem(ArmorSlot04)
	endif
	if (ArmorSlot05 != EmptySlot)
		self.GetActorRef().EquipItem(ArmorSlot05)
	endif
	if (ArmorSlot06 != EmptySlot)
		self.GetActorRef().EquipItem(ArmorSlot06)
	endif
	if (ArmorSlot07 != EmptySlot)
		self.GetActorRef().EquipItem(ArmorSlot07)
	endif
	if (ArmorSlot08 != EmptySlot)
		self.GetActorRef().EquipItem(ArmorSlot08)
	endif
	if (ArmorSlot09 != EmptySlot)
		self.GetActorRef().EquipItem(ArmorSlot09)
	endif
	if (ArmorSlot10 != EmptySlot)
		self.GetActorRef().EquipItem(ArmorSlot10)
	endif
endFunction

Function EquipCurrentWeapon()
	if self.GetActorRef() == None
		Return
	Endif
	if (WeaponSlot01 != EmptySlot)
		self.GetActorRef().EquipItem(WeaponSlot01)
	endif
	if (WeaponSlot02 != EmptySlot)
		self.GetActorRef().EquipItem(WeaponSlot02)
	endif
	if (WeaponSlot03 != EmptySlot)
		self.GetActorRef().EquipItem(WeaponSlot03)
	endif
endFunction

Function AddToArmorSlot(Form akBaseItem)
	bool FoundEmptySlot = FALSE
	if (ArmorSlot01 == EmptySlot) && (FoundEmptySlot == FALSE)
		ArmorSlot01 = akBaseItem
		FoundEmptySlot = TRUE
	endif
	if (ArmorSlot02 == EmptySlot) && (FoundEmptySlot == FALSE)
		ArmorSlot02 = akBaseItem
		FoundEmptySlot = TRUE
	endif
	if (ArmorSlot03 == EmptySlot) && (FoundEmptySlot == FALSE)
		ArmorSlot03 = akBaseItem
		FoundEmptySlot = TRUE
	endif
	if (ArmorSlot04 == EmptySlot) && (FoundEmptySlot == FALSE)
		ArmorSlot04 = akBaseItem
		FoundEmptySlot = TRUE
	endif
	if (ArmorSlot05 == EmptySlot) && (FoundEmptySlot == FALSE)
		ArmorSlot05 = akBaseItem
		FoundEmptySlot = TRUE
	endif
	if (ArmorSlot06 == EmptySlot) && (FoundEmptySlot == FALSE)
		ArmorSlot06 = akBaseItem
		FoundEmptySlot = TRUE
	endif
	if (ArmorSlot07 == EmptySlot) && (FoundEmptySlot == FALSE)
		ArmorSlot07 = akBaseItem
		FoundEmptySlot = TRUE
	endif
	if (ArmorSlot08 == EmptySlot) && (FoundEmptySlot == FALSE)
		ArmorSlot08 = akBaseItem
		FoundEmptySlot = TRUE
	endif
	if (ArmorSlot09 == EmptySlot) && (FoundEmptySlot == FALSE)
		ArmorSlot09 = akBaseItem
		FoundEmptySlot = TRUE
	endif
	if (ArmorSlot10 == EmptySlot) && (FoundEmptySlot == FALSE)
		ArmorSlot10 = akBaseItem
		FoundEmptySlot = TRUE
	endif
	FoundEmptySlot = FALSE
endFunction

Function AddToWeaponSlot(Form akBaseItem)
	bool FoundEmptySlot = FALSE
	if (WeaponSlot01 == EmptySlot) && (FoundEmptySlot == FALSE)
		WeaponSlot01 = akBaseItem
		FoundEmptySlot = TRUE
	endif
	if (WeaponSlot02 == EmptySlot) && (FoundEmptySlot == FALSE)
		WeaponSlot02 = akBaseItem
		FoundEmptySlot = TRUE
	endif
	if (WeaponSlot03 == EmptySlot) && (FoundEmptySlot == FALSE)
		WeaponSlot03 = akBaseItem
		FoundEmptySlot = TRUE
	endif
	FoundEmptySlot = FALSE
endFunction


Function RemoveFromArmorSlot(Form akBaseItem)
	bool FoundMatchingSlot = FALSE
	if (ArmorSlot01 == akBaseItem) && (FoundMatchingSlot == FALSE)
		ArmorSlot01 = EmptySlot
		FoundMatchingSlot = TRUE
	endif
	if (ArmorSlot02 == akBaseItem) && (FoundMatchingSlot == FALSE)
		ArmorSlot02 = EmptySlot
		FoundMatchingSlot = TRUE
	endif
	if (ArmorSlot03 == akBaseItem) && (FoundMatchingSlot == FALSE)
		ArmorSlot03 = EmptySlot
		FoundMatchingSlot = TRUE
	endif
	if (ArmorSlot04 == akBaseItem) && (FoundMatchingSlot == FALSE)
		ArmorSlot04 = EmptySlot
		FoundMatchingSlot = TRUE
	endif
	if (ArmorSlot05 == akBaseItem) && (FoundMatchingSlot == FALSE)
		ArmorSlot05 = EmptySlot
		FoundMatchingSlot = TRUE
	endif
	if (ArmorSlot06 == akBaseItem) && (FoundMatchingSlot == FALSE)
		ArmorSlot06 = EmptySlot
		FoundMatchingSlot = TRUE
	endif
	if (ArmorSlot07 == akBaseItem) && (FoundMatchingSlot == FALSE)
		ArmorSlot07 = EmptySlot
		FoundMatchingSlot = TRUE
	endif
	if (ArmorSlot08 == akBaseItem) && (FoundMatchingSlot == FALSE)
		ArmorSlot08 = EmptySlot
		FoundMatchingSlot = TRUE
	endif
	if (ArmorSlot09 == akBaseItem) && (FoundMatchingSlot == FALSE)
		ArmorSlot09 = EmptySlot
		FoundMatchingSlot = TRUE
	endif
	if (ArmorSlot10 == akBaseItem) && (FoundMatchingSlot == FALSE)
		ArmorSlot10 = EmptySlot
		FoundMatchingSlot = TRUE
	endif
endFunction

Function RemoveFromWeaponSlot(Form akBaseItem)
	bool FoundMatchingSlot = FALSE
	if (WeaponSlot01 == akBaseItem) && (FoundMatchingSlot == FALSE)
		WeaponSlot01 = EmptySlot
		FoundMatchingSlot = TRUE
	endif
	if (WeaponSlot02 == akBaseItem) && (FoundMatchingSlot == FALSE)
		WeaponSlot02 = EmptySlot
		FoundMatchingSlot = TRUE
	endif
	if (WeaponSlot03 == akBaseItem) && (FoundMatchingSlot == FALSE)
		WeaponSlot03 = EmptySlot
		FoundMatchingSlot = TRUE
	endif
endFunction

Function BackupOutfit()
	BK_ArmorSlot01 = self.GetActorRef().GetEquippedArmorInSlot(30)
	BK_ArmorSlot02 = self.GetActorRef().GetEquippedArmorInSlot(31)
	BK_ArmorSlot03 = self.GetActorRef().GetEquippedArmorInSlot(32)
	BK_ArmorSlot04 = self.GetActorRef().GetEquippedArmorInSlot(33)
	BK_ArmorSlot05 = self.GetActorRef().GetEquippedArmorInSlot(34)
	BK_ArmorSlot06 = self.GetActorRef().GetEquippedArmorInSlot(35)
	BK_ArmorSlot07 = self.GetActorRef().GetEquippedArmorInSlot(36)
	BK_ArmorSlot08 = self.GetActorRef().GetEquippedArmorInSlot(37)
	BK_ArmorSlot09 = self.GetActorRef().GetEquippedArmorInSlot(38)
	BK_ArmorSlot10 = self.GetActorRef().GetEquippedArmorInSlot(39)
	BK_ArmorSlot11 = self.GetActorRef().GetEquippedArmorInSlot(40)
	BK_ArmorSlot12 = self.GetActorRef().GetEquippedArmorInSlot(41)
	BK_ArmorSlot13 = self.GetActorRef().GetEquippedArmorInSlot(42)
	BK_ArmorSlot14 = self.GetActorRef().GetEquippedArmorInSlot(43)
	BK_ArmorSlot15 = self.GetActorRef().GetEquippedArmorInSlot(44)
	BK_ArmorSlot16 = self.GetActorRef().GetEquippedArmorInSlot(45)
	BK_ArmorSlot17 = self.GetActorRef().GetEquippedArmorInSlot(46)
	BK_ArmorSlot18 = self.GetActorRef().GetEquippedArmorInSlot(47)
	BK_ArmorSlot19 = self.GetActorRef().GetEquippedArmorInSlot(48)
	BK_ArmorSlot20 = self.GetActorRef().GetEquippedArmorInSlot(49)
	BK_ArmorSlot21 = self.GetActorRef().GetEquippedArmorInSlot(52)
	BK_ArmorSlot22 = self.GetActorRef().GetEquippedArmorInSlot(53)
	BK_ArmorSlot23 = self.GetActorRef().GetEquippedArmorInSlot(54)
	BK_ArmorSlot24 = self.GetActorRef().GetEquippedArmorInSlot(55)
	BK_ArmorSlot25 = self.GetActorRef().GetEquippedArmorInSlot(56)
	BK_ArmorSlot26 = self.GetActorRef().GetEquippedArmorInSlot(57)
	BK_ArmorSlot27 = self.GetActorRef().GetEquippedArmorInSlot(58)
	BK_ArmorSlot28 = self.GetActorRef().GetEquippedArmorInSlot(59)
	BK_ArmorSlot29 = self.GetActorRef().GetEquippedArmorInSlot(60)
	Debug.notification("BackupOutfit:")
	debug.notification(BK_ArmorSlot01)
	debug.notification(BK_ArmorSlot03)
	debug.notification(BK_ArmorSlot05)
	debug.notification(BK_ArmorSlot09)
	debug.notification(BK_ArmorSlot11)
	debug.notification(BK_ArmorSlot15)
	debug.notification(BK_ArmorSlot19)
	debug.notification(BK_ArmorSlot21)
	debug.notification(BK_ArmorSlot25)
	debug.notification(BK_ArmorSlot29)
EndFunction

Function RestoreOutfit()
	self.GetActorRef().EquipItem(BK_ArmorSlot01)
	self.GetActorRef().EquipItem(BK_ArmorSlot02)
	self.GetActorRef().EquipItem(BK_ArmorSlot03)
	self.GetActorRef().EquipItem(BK_ArmorSlot04)
	self.GetActorRef().EquipItem(BK_ArmorSlot05)
	self.GetActorRef().EquipItem(BK_ArmorSlot06)
	self.GetActorRef().EquipItem(BK_ArmorSlot07)
	self.GetActorRef().EquipItem(BK_ArmorSlot08)
	self.GetActorRef().EquipItem(BK_ArmorSlot09)
	self.GetActorRef().EquipItem(BK_ArmorSlot10)
	self.GetActorRef().EquipItem(BK_ArmorSlot11)
	self.GetActorRef().EquipItem(BK_ArmorSlot12)
	self.GetActorRef().EquipItem(BK_ArmorSlot13)
	self.GetActorRef().EquipItem(BK_ArmorSlot14)
	self.GetActorRef().EquipItem(BK_ArmorSlot15)
	self.GetActorRef().EquipItem(BK_ArmorSlot16)
	self.GetActorRef().EquipItem(BK_ArmorSlot17)
	self.GetActorRef().EquipItem(BK_ArmorSlot18)
	self.GetActorRef().EquipItem(BK_ArmorSlot19)
	self.GetActorRef().EquipItem(BK_ArmorSlot20)
	self.GetActorRef().EquipItem(BK_ArmorSlot21)
	self.GetActorRef().EquipItem(BK_ArmorSlot22)
	self.GetActorRef().EquipItem(BK_ArmorSlot23)
	self.GetActorRef().EquipItem(BK_ArmorSlot24)
	self.GetActorRef().EquipItem(BK_ArmorSlot25)
	self.GetActorRef().EquipItem(BK_ArmorSlot26)
	self.GetActorRef().EquipItem(BK_ArmorSlot27)
	self.GetActorRef().EquipItem(BK_ArmorSlot28)
	self.GetActorRef().EquipItem(BK_ArmorSlot29)
	Debug.notification("RestoreOutfi:")
	debug.notification(BK_ArmorSlot01)
	debug.notification(BK_ArmorSlot03)
	debug.notification(BK_ArmorSlot05)
	debug.notification(BK_ArmorSlot09)
	debug.notification(BK_ArmorSlot11)
	debug.notification(BK_ArmorSlot15)
	debug.notification(BK_ArmorSlot19)
	debug.notification(BK_ArmorSlot21)
	debug.notification(BK_ArmorSlot25)
	debug.notification(BK_ArmorSlot29)
endfunction


Edited by pxd2050, 01 August 2020 - 03:40 AM.


#4
IsharaMeradin

IsharaMeradin

    The Pale Redguard

  • Members
  • PipPipPipPipPip
  • 8,827 posts

You could re-post or ask a moderator to move the thread to the appropriate location:  SSE section of the forums

 

You may want to try GetWornForm instead.  With no documentation for the proper usage of GetEquippedArmorInSlot I have no idea how to assist with that.

 

One thing that might help speed up your script:  Replace all instances of self.GetActorRef() with a local variable.  For example:

Spoiler

 

 

Another thing I noticed is your use of the EmptySlot property variable.  This is unnecessary.  You are hiding the property so that nothing can be assigned to it.  In actuality this is nothing more than If ArmorSlot01 != None

 



#5
pxd2050

pxd2050

    Journeyman

  • Members
  • Pip
  • 26 posts

ah,thank your replay.

just your answer make me know :why Le have not mod can restore initial Outfit,because have not fuction just as GetEquippedArmorInSlot() to do.

As the first mod, I will spend more time on it

Forgive me for my poor English  ahhh



#6
ReDragon2013

ReDragon2013

    Old hand

  • Members
  • PipPipPip
  • 525 posts

What IsharaMeradin already wrote: "One thing that might help speed up your script:  Replace all instances of self.GetActorRef() with a local variable."

 

The scriptname is very poor and not unique enough, this schould be changed. I also use an array to  decrease the amount of properties.

 

Spoiler

Edited by ReDragon2013, 02 August 2020 - 09:30 AM.


#7
pxd2050

pxd2050

    Journeyman

  • Members
  • Pip
  • 26 posts

What IsharaMeradin already wrote: "One thing that might help speed up your script:  Replace all instances of self.GetActorRef() with a local variable."

 

The scriptname is very poor and not unique enough, this schould be changed. I also use an array to  decrease the amount of properties.

 

Spoiler

 

What IsharaMeradin already wrote: "One thing that might help speed up your script:  Replace all instances of self.GetActorRef() with a local variable."

 

The scriptname is very poor and not unique enough, this schould be changed. I also use an array to  decrease the amount of properties.

 

Spoiler

 

thank your wonderful reply

I will try it  first,just a minute






Page loaded in: 1.013 seconds