Jump to content
ℹ️ Intermittent Download History issues ×

Custom Script no longer working


eleglas

Recommended Posts

Last night I stayed up to about 2am to get my script working, and when I finished it did work 100%. However when I came on this morning, I decided to download Honest Hearts and Dead Money as I haven't played them before. I bought them off Steam, installed and enabled the esm in FOMM, I did nothing to my script but when I load my save game, not one thing in my script worked. It didn't crash, it just did nothing. I went back through GECK to see if I was missing something, it is fine from what I can see, but it still doesn't work.

 

I'm getting very frustrated with this, like I said I spent ages getting it to work and now it isn't. My script is below incase anyone can see what's wrong. My script does multiple things, including adding a stealth module and equipping it when I press a button and removing it when I press another; it does this for multiple companions, including one custom one. It also switches my currently equipped weapon, one long range the other short. It also takes the helmet off the player and companions when I press a button and put it back on with another.

 

Thanks

 

SCN aaaStealthX

Int gHeld
Int hHeld

Int xHeld
Int cHeld

Int mHeld
Int ,Held

Begin OnEquip
Set gHeld to 0
Set hHeld to 0
Set xHeld to 0
Set cHeld to 0
Set mHeld to 0
Set ,Held to 0
END

;========================================================

Begin GameMode

If player.GetEquipped 000TuskanArmor == 1

If IsKeyPressed 34 && hHeld == 0; G
	If player.GetItemCount 000StealthModule == 0
		player.Additem 000StealthModule 1 1
	Endif
	player.Equipitem 000StealthModule 1 1
	set gHeld to 1
Else
	set gHeld to 0
Endif

If IsKeyPressed 35 && gHeld == 0; H 
	player.UnEquipitem 000StealthModule 1 1
	player.Removeitem 000StealthModule 1 1
	set hHeld to 1
Else
	set hHeld to 0
Endif

Endif

;---------------------------------------------------------------------------------------------------------------

If RoseOfSharonCassidyREF.GetEquipped 000TuskanArmor == 1

If IsKeyPressed 34 && hHeld == 0; G
	If RoseOfSharonCassidyREF.GetItemCount 000StealthModule == 0
		RoseOfSharonCassidyREF.Additem 000StealthModule 1 1
	Endif
	RoseOfSharonCassidyREF.Equipitem 000StealthModule 1 1
Endif

If IsKeyPressed 35 && gHeld == 0; H 
	RoseOfSharonCassidyREF.UnEquipitem 000StealthModule 1 1
	RoseOfSharonCassidyREF.Removeitem 000StealthModule 1 1
Endif

Endif

;---------------------------------------------------------------------------------------------------------------

If CraigBooneREF.GetEquipped 000TuskanArmor == 1

If IsKeyPressed 34 && hHeld == 0; G
	If CraigBooneREF.GetItemCount 000StealthModule == 0
		CraigBooneREF.Additem 000StealthModule 1 1
	Endif
	CraigBooneREF.Equipitem 000StealthModule 1 1
Endif

If IsKeyPressed 35 && gHeld == 0; H 
	CraigBooneREF.UnEquipitem 000StealthModule 1 1
	CraigBooneREF.Removeitem 000StealthModule 1 1
Endif

Endif

;---------------------------------------------------------------------------------------------------------------

If ArcadeREF.GetEquipped 000TuskanArmor == 1

If IsKeyPressed 34 && hHeld == 0; G
	If ArcadeREF.GetItemCount 000StealthModule == 0
		ArcadeREF.Additem 000StealthModule 1 1
	Endif
	ArcadeREF.Equipitem 000StealthModule 1 1
Endif

If IsKeyPressed 35 && gHeld == 0; H 
	ArcadeREF.UnEquipitem 000StealthModule 1 1
	ArcadeREF.Removeitem 000StealthModule 1 1
Endif

Endif
;---------------------------------------------------------------------------------------------------------------

If RaiderGirlREF.GetEquipped 000TuskanArmor == 1

If IsKeyPressed 34 && hHeld == 0; G
	If RaiderGirlREF.GetItemCount 000StealthModule == 0
		RaiderGirlREF.Additem 000StealthModule 1 1
	Endif
	RaiderGirlREF.Equipitem 000StealthModule 1 1
Endif

If IsKeyPressed 35 && gHeld == 0; H 
	RaiderGirlREF.UnEquipitem 000StealthModule 1 1
	RaiderGirlREF.Removeitem 000StealthModule 1 1
Endif

Endif

END

;========================================================

Begin GameMode

If IsKeyPressed 45 && cHeld == 0; X
If player.GetItemCount 000TuskanRifleShort == 0
	player.AddItem 000TuskanRifleShort 1 1
Endif
player.UnEquipitem 000TuskanRifleLong 0 1
player.Removeitem 000TuskanRifleLong 1 1
player.Equipitem 000TuskanRifleShort 0 1
Set xHeld to 1
Else
	Set xHeld to 0
Endif

If IsKeyPressed 46 && xHeld == 0; C
If player.GetItemCount 000TuskanRifleLong == 0
	player.AddItem 000TuskanRifleLong 1 1
Endif
player.UnEquipitem 000TuskanRifleShort 0 1
player.Removeitem 000TuskanRifleShort 1 1
player.Equipitem 000TuskanRifleLong 0 1
Set cHeld to 1
Else
	Set cHeld to 0
Endif

END

;========================================================

Begin GameMode

If IsKeyPressed 50 && ,Held == 0; M

If Player.GetEquipped 000StealthModule == 0
	Player.unequipitem 000TuskanHelmet 0 1
Endif

;---------------------------------------------------------------------------------------------------------------

If RoseOfSharonCassidyREF.GetEquipped 000StealthModule == 0
	RoseOfSharonCassidyREF.unequipitem 000TuskanHelmet 0 1
Endif

;---------------------------------------------------------------------------------------------------------------

If CraigBooneREF.GetEquipped 000StealthModule == 0
	CraigBooneREF.unequipitem 000TuskanHelmet 0 1
		If CraigBooneREF.GetItemCount GlassesShades == 0
			CraigBooneREF.Additem GlassesShades 1 1
		Endif
	CraigBooneREF.equipitem GlassesShades 0 1
Endif

;---------------------------------------------------------------------------------------------------------------

If ArcadeREF.GetEquipped 000StealthModule == 0
	ArcadeREF.unequipitem 000TuskanHelmet 0 1
		If ArcadeREF.GetItemCount GlassesBlackrimmed == 0
			ArcadeREF.Additem GlassesBlackrimmed 1 1
		Endif
	ArcadeREF.equipitem GlassesBlackrimmed 0 1
Endif

;---------------------------------------------------------------------------------------------------------------

If RaiderGirlREF.GetEquipped 000StealthModule == 0
	RaiderGirlREF.unequipitem 000TuskanHelmet 0 1
Endif

Set mHeld to 1

Else
Set mHeld to 0
Endif

If IsKeyPressed 51 && mHeld == 0; ,
	Player.equipitem 000TuskanHelmet 0 1
	RoseOfSharonCassidyREF.equipitem 000TuskanHelmet 0 1
	CraigBooneREF.equipitem 000TuskanHelmet 0 1
		CraigBooneREF.Removeitem GlassesShades 1 1
	ArcadeREF.equipitem 000TuskanHelmet 0 1
		ArcadeREF.Removeitem GlassesBlackrimmed 1 1
	RaiderGirlREF.equipitem 000TuskanHelmet 0 1
Set ,Held to 1
Else
Set ,Held to 0
Endif

END

Link to comment
Share on other sites

  • Recently Browsing   0 members

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