Plarux Posted March 25, 2019 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!
Evangela Posted March 25, 2019 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
SKKmods Posted March 25, 2019 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()
Zorkaz Posted April 2, 2019 Posted April 2, 2019 Btw. there's a default script for that ingame. It's called "defaultadditemonactivate"
Recommended Posts