Jump to content

Need help with a simple script


RedBag

Recommended Posts

I want to disable some and enable other objects in my mod when a certain quest (MS14) completes (200 is last stage). So i set the parent of all of them as an xmarker, and the checked the "set enable state to opposite of parent" box for objects that i want to be disabled at first (not the "initially disabled" box). Then i wrote a simple script that would disable the parent xmarker whenever MS14 is completed, but the script won't compile and throws this message:

 

cannot call the member function getstage alone or on a type, must call it on a variable
No output generated for RedBagsMorthalBurntHouseScript, compilation failed.

This is my script:

 

Scriptname RedBagsMorthalBurntHouseScript extends ObjectReference  


ObjectReference Property RedBagBurntHouseXMarkerREF Auto


Event OnCellLoad()
if MS14.getstage() == 200
RedBagBurntHouseXMarkerREF.disable()
endif


endEvent

The objects that i want to have disabled at first are indeed disabled, but when i complete the quest nothing happens, the disabled ones stay disabled, and enabled ones stay enabled.

 

Another question, is OnCellLoad a good event or should i use something else?

 

Edited by RedBag
Link to comment
Share on other sites

  • Recently Browsing   0 members

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