Jump to content

Recommended Posts

Posted

Hi all. Old modder back from the dead here.. still re-learning.

The good old 'RemovableTorchSconce01'. I've been through the script and as I said I haven't modded for years and am unsure what I need to do. I want the sconce(s) to start empty. Player finds a torch on the ground and can place it in various sconces around the cell to light the area. I don't want the player to always carry the torch (reasons for another post). Also I want a light source, I know how to place them, to be enabled when a torch is in a sconce and disabled when it isn't. As I said I am not sure the script on the base sconce does this or I am setting properties wrong... or something completely different.

Help appreciated, it will come back to me bit by bit but for now I am in noob territory.

Posted (edited)
I'm gussing you are using the 'RemovableTorchSconce01' activator, if so, you only need to "Check" in the script's properties the "Start empty", keep in mind that for the torch to be placed in the sconce you need to have torches in your inventory or to be holding one.
The default vanilla script dosen't have the option to enable light upon placing the torch, you need your own script for this.
There are two ways you can do this:
1) In the RemovableTorchSconce01 "Reference" window go to "Scripts" and click "Add", when the script window appears click "New Script", give a name and description & press "Ok", now right click the new created script and choose "Edit Source" and paste in this little script and save for the compile to be executed.
  Reveal hidden contents

Then go to properties and Link Ref your light, for what you want to do the light should be in a "Initially Disable" state (botton left corner in the objects "Reference" window).
* The down side with this approach is that if you activate the torch sconce without having torch the second script will still fire.
* This scripts has the fanction to auto detect the enable/disable state of the object and then do the opposite, i'm meantion this just in case you might need to do something else that might need this kind of function (like enable/disable lights or a wall when you activate a "lever" or a "PullChain")
2) From the RemovableTorchSconce01 "Reference" window select the script and click "Remove" (you should see now a red line just beside it).
Now you "Add" & create a "New Script" as you did before, with the only difference that you will use one script instead of two.
This is a slightly modified version of the default vanilla script with the option to enable light when the torch is placed and disable the light when the torch is remove.
  Reveal hidden contents

 

Here the light should also be in a "Initially Disable" state. Don't forget to Link Ref the light from the script's properties.

 

Have a happy modding....

Edited by maxarturo
Posted (edited)
I checked the vanilla script once more before closing CK, and there is an option to enable/disable light.

What you need to do is place your light and then go to the RemovableTorchSconce01 "Reference" window, and in the "Link Ref" tab double click the empty white box and then "select Ref from render window", double click your light. That's all.


* Sorry... too tired...

Edited by maxarturo
Posted

Thanks for your help. Works as you said it would. On a similar note, I have noticed that if the player has a torch equipped for X amount of time it will go out (be removed from inventory). This is interesting for my particular mod as for a portion of the game the player has to realise that without a torch progress will be greatly impeded. Do you know the time limit, scratch that I'll time it, but how to change the time limit?

Posted

In every torch that you will put - place in your cell, go to each torch "Reference" menu and in the tab "Extra" set the "Time left" to your desirable settings.

Posted (edited)

I'll have to check this in CK whenever i get home, but from what i can remember it's something like that (but i could be wrong)

 

* For your fire trap you will need to clarify if you will allow players to use TGM (it's scripted differently). The difference is that if not using TGM the player dies and then the game will load the most recent save, but if the player uses TGM the explosion will fire and the player won't die and he'll keep playing.

Edited by maxarturo
  • Recently Browsing   0 members

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