Jump to content

Having a bit of trouble with my Activator script


MrMod89

Recommended Posts

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

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

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

  • 10 months later...
  On 11/27/2014 at 12:12 AM, IsharaMeradin said:

 

  On 11/26/2014 at 11:25 PM, MrMod89 said:

 

@Ishara Meradin

I'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

  • Recently Browsing   0 members

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