Jump to content

CK Items appearing and disappearing


mikolajgos

Recommended Posts

Hi guys,

 

I have an (as I suppose) easy questiont for experienced modders about pieces appearing or dissapearing. What I mean is like when you buy extensions for your house and some items (like furniture) appear and other varnish. I wanted a specific static item or light to show when I pull a lever or any other activator. Unfortunately I couldn't find any information in the CK Wiki or in google so I'd be glad if you give me any tips how to do that.

Edited by mikolajgos
Link to comment
Share on other sites

You need to write a light control script if you want to use the impswitch01 (single push button), not sure if you need it for a 2state lever.. But the gist is you put your light or item where you want it, place an xmarker nearby making sure it is flagged as "initially disable", in the light/object ref properties, select the Enable Parent tab and set the parent as the xmarker (use an xmarker even for a single item, especially lights), then point your lever activator at the xmarker.
Link to comment
Share on other sites

Firstly, thanks for the response. I used your instructions, I created a button and lever, created static xmarker and a few static and light objects. As you said, I set the xmarkers to initially disabled and set enable parent in the static to the xmarker. Then I activated parent (in xmarker's properties to the button/lever). Saved and even after a few times I could't make it work properly. Static items aren't visible in the game, but they won't appear after activating. Am I forgetting something..? :/
Link to comment
Share on other sites

Not entirely sure if it makes a difference, but i use "Activate parents" on the triggers and see if that works, i have not tested to activate things exactly like this, but very similar, i use mine to activate a number of doors in sequence.

 

EDIT: I had to test this extensively, so i added also made a light that i want to toggle on and off using xmarkers etc like i did with doors and my banners.

 

 

Alright i got it, you have to:

 

- do as sunnie said first (enable parent on all objects/lights to an x-marker and set it as initally disabled)

- select the xmarker  and set it as activate parent to a lever or anything other activator.

- Apply the script "defaultEnableLinkedRefOnActivate" to the lever/activator itself

- Link ref the activator to the xmarker

- Apply the script "defaultToggleSelfOnActivate" to the xmarker

 

And you are done, test it ingame, worked like a charm for me. You might not need the "defaultEnableLinkedRefOnActivate" when you got the toggle script running, i just wanted to test without removing it first, so experiment with that if you wish :)

Link to comment
Share on other sites

Well make sure nothing tells the activator to be disabled, it should not vanish into thin air without anything giving it the command to disable itself, check the scripts and see if something you can't remember adding for example. There are scripts that will disable items when they have been activated once for example.
Link to comment
Share on other sites

  • Recently Browsing   0 members

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