Jump to content

Remove and Add Items On Activate Script


mojavesuave

Recommended Posts

I'm trying to make a mod that removes an object after being activated. When the player activates the object and it is removed, the player will also have items added to the inventory.

I'm having trouble figuring out the syntaxes I need to make the script work.

I tried to work off of a plant activator script but I don't think plants get removed just changed to a different physical state

 

Edit: I ended up going with something like this and it worked! The key was disable after setdestroyed

 

begin onActivate
	if State == 0 && GetActionRef == player
		player.additem JalapenoPepper 1
		set State to 1
		playGroup Forward 1
		setdestroyed 1
		disable
	endif
end
Edited by mojavesuave
Link to comment
Share on other sites

  • Recently Browsing   0 members

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