MrMod89 Posted November 26, 2014 Share Posted November 26, 2014 I am trying to build a player safehouse with activators that give you items every time you use the action button on them. What I find odd is that my script doesn't seem to work. Here is the script for an Iron Ore Deposit Activator: Scriptname IronReserveScript extends ObjectReference MiscObject Property OreIron Auto Event OnActivate(ObjectReference akActionRef) Game.GetPlayer().AddItem(OreIron, 10, true); EndEvent Activator Property Reserve Auto I am a novice when it comes to scripting. However, I just require correction so I can write the process down. Any help? Link to comment Share on other sites More sharing options...
IsharaMeradin Posted November 26, 2014 Share Posted November 26, 2014 First off, probably not working because you need to fill in the properties with the correct data. Go to the form where the script is attached, highlight the script and press the properties button that is nearby. A new window appears, select a property, on the right hand side of that window data boxes appear that you can use to locate the appropriate data. If you named the property variable the same as the object you wish the property to represent then you can use the auto-fill button to automatically fill the property for you. Second, why do you have an activator property when that property is not being used by the script? Link to comment Share on other sites More sharing options...
simsim899 Posted November 26, 2014 Share Posted November 26, 2014 Also, make sure when you place your activator in the world, you check that in the primitive tab, 'player activation' is ticked. Also, you should make sure in the 3D data that on the x y and z axis it's offset by like 0.0001 (so it's anything but 0.0000) or it might not let you activate it (some sort of bug with the CK I think). Link to comment Share on other sites More sharing options...
Terra Nova Posted November 26, 2014 Share Posted November 26, 2014 Others have pretty much covered it. Script's syntax is fine. Just check your ore property. The activator property isn't necessary since the script is attached to the activator in question. Link to comment Share on other sites More sharing options...
MrMod89 Posted November 26, 2014 Author Share Posted November 26, 2014 @Terra NovaThanks @simsim899it is in the world. @Ishara MeradinI'm correcting the data, but please try not to cave in on people who just want a simple answer. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted November 27, 2014 Share Posted November 27, 2014 (edited) On 11/26/2014 at 11:25 PM, MrMod89 said: @Ishara MeradinI'm correcting the data, but please try not to cave in on people who just want a simple answer.What do you mean by "cave in"? Edited November 27, 2014 by IsharaMeradin Link to comment Share on other sites More sharing options...
MrMod89 Posted October 15, 2015 Author Share Posted October 15, 2015 On 11/27/2014 at 12:12 AM, IsharaMeradin said: On 11/26/2014 at 11:25 PM, MrMod89 said: @Ishara MeradinI'm correcting the data, but please try not to cave in on people who just want a simple answer.What do you mean by "cave in"? It means being harsh. Link to comment Share on other sites More sharing options...
Recommended Posts