Jump to content

Quick Question - Quick Answer


Cipscis

Recommended Posts

  • Replies 804
  • Created
  • Last Reply

Top Posters In This Topic

I need to add an item to a specific container using a script, but every time I put the container editor ID, followed by .additem, then the item I want to add and the quantity, it says that the container isn't an object. How would I properly reference the container?
Link to comment
Share on other sites

You can't use the EditorID of the container reference's base object to specify it, instead you need to check the container reference as a "persistent reference" and give it a unique EditorRefID. You can then specify the container via script by using its EditorRefID.

 

Cipscis

Link to comment
Share on other sites

Hello, I`m having troubles adding an item requirement to use an activator.

 

Right now the activator has this script attached to it..

 

 

ScriptName bpchurchswitch

ref light

Begin OnActivate

if light == 0
	set light to GetLinkedRef
endif

if light.GetDisabled
	light.Enable
else
	light.Disable
endif
Activate

End

 

 

The basic light switch script... I `m trying to add a requirement of 25 fission batteries before you can use it. Is the easiest way of doing this, adding a quest to the activator? Or by modifying the script more?

 

I could do this by quest conditions, but how do I add the quest to the activator?

Link to comment
Share on other sites

ScriptName bpchurchswitch

ref light

short doonce

Begin OnActivate

if (doonce == 0)
 if (getitemcount <fision batteries> >= <quantity>
additem <menu armor token>
 endif
 return
endif

<rest of code>

 

and make an invisible armor that onadd shows a message and gamemode if getbuttonpressed removeitem batteries, set switchref.doonce to 1, removeme, else, removeme.

Link to comment
Share on other sites

I have an interior I set a teleport to from the wasteland, and whenever I try to enter (while using FOSE) the game crashes shortly after it starts loading the interior. I have no idea why, because when using the original fallout loader, it works fine.
Link to comment
Share on other sites

Allright I've got this set up like so...

 

The script attached to the activator in game ----

 

ScriptName bpchurchswitch

ref light

short doonce

Begin OnActivate

if (doonce == 0)
 if (getitemcount fissionbattery >= 25)
additem bpchurchswitchtoken
 endif
 return
endif


if light == 0
	set light to GetLinkedRef
endif

if light.GetDisabled
	light.Enable
else
	light.Disable
endif
Activate

End

 

 

It says "line 11, missing parameter count"

 

On the armor, I have this script attached to it

 

ScriptName bpchurchswitchtokenscript

Begin OnAdd

showmessage bpchurchswitchnote

If getbuttonpressed removeitem fissionbattery == 25

set switchref.doonce to 1

removeme

endif

end

 

This is giving me an error "invalid message 'bpchurchsiwtchnote' "

 

bpchurchswitchnote is a note I created, cannot I use this?

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...