Plarux Posted March 25, 2019 Share Posted March 25, 2019 Hello everyone, I need help figuring out how to get my activator to disable upon being activated. Below is a script connected to the activator: Scriptname PS_AmmoPouchScript extends ObjectReference Ammo Property Ammo308Caliber Auto ObjectReference Property PL_AmmoPouchActivator Auto Event OnActivate(ObjectReference akActionRef) if akActionRef == Game.GetPlayer() Game.GetPlayer().AddItem(Ammo308Caliber, 20, true) endif EndEvent What I need help with is finding a way to disable the activator once it gives the player the ammo & display a message saying "20 .308 Rounds added" like when you pick up a chem or another item. If you could lend a hand, it would be greatly appreciated! Link to comment Share on other sites More sharing options...
Evangela Posted March 25, 2019 Share Posted March 25, 2019 (edited) if akActionRef == Game.GetPlayer() Game.GetPlayer().AddItem(Ammo308Caliber, 20, true) utility.wait(0.1) Disable() endif Edited March 25, 2019 by Rasikko Link to comment Share on other sites More sharing options...
SKKmods Posted March 25, 2019 Share Posted March 25, 2019 plus if your never going to use that activator again, to help keep the system clean ("Self." is inferred, so optional): Self.Disable() Self.Delete() Link to comment Share on other sites More sharing options...
Plarux Posted March 31, 2019 Author Share Posted March 31, 2019 Good looks guys! I appreciate the help. Link to comment Share on other sites More sharing options...
Zorkaz Posted April 2, 2019 Share Posted April 2, 2019 Btw. there's a default script for that ingame. It's called "defaultadditemonactivate" Link to comment Share on other sites More sharing options...
Recommended Posts