Jump to content

Adding/Removing items from player without messages


Crystalking52

Recommended Posts

Greetings, I am attempting to make a script that upon obtaining a floating Sunset Sarsaparilla Bottle, the game will 'invisibly' swap it out for a normal Sunset Sarsaparilla Bottle. I decided to try basing my script off of the Unofficial Fallout 3 The Pitt Patch's Steel Ingot script which did a similar thing:

SCN DLC01SteelPlateActivatorSCRIPT

Short Activated

Begin GameMode
	If Activated == 1
		Set Activated to 0
		ClearNoActivationSound
	EndIf
End

Begin OnActivate Player
	SetNoActivationSound UIItemGenericUp
	Set Activated to 1
	Player.additem DLC01SteelPlate 1 1
	Disable
End

Here's my edited script:

scn SSBottleEmptyNoFloatScript

Short SSBottleExchange

Begin GameMode
	If SSBottleExchange == 1
		Set SSBottleExchange to 0
		ClearNoActivationSound
	EndIf
End

Begin OnAdd Player
	SetNoActivationSound UIItemGenericUp
	Set SSBottleExchange to 1
	Player.additem SSBottleEmpty 1
	Player.removeitem SSBottleEmptyNoFloat 1
End

Unlike the Steel ingot script, this one displays messages (and plays the item pickup sound twice in a row.) Is there anything I've done wrong?

 

EDIT: I'm an idiot, I deleted the 1 after the additem/removeitem and that fixed it. And the SetNoActivationSound should only be used with an actual Activator. Learn from my mistake everyone!

Edited by Crystalking52
Link to comment
Share on other sites

  • Recently Browsing   0 members

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