Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Enable Items through Scripts, Building a Base Camp


DarkPhoenix
 Share

Recommended Posts

Hey, I've got a quick question about how to use the enable command. I haven't found any reliable information on this and as far as I understand this is the command used to make furniture appear, in this instance I am trying to establish a base camp that is slowly built through stages. I have the entire first stage built and and everything is initially disabled, but I cannot for the life of me figure out how to enable it. Any help would be much appreciated. Thanks.

-Dark

Link to comment
Share on other sites

You just choose one disabled object to be the "parent" Double click on it and give it an ID like MyCampParentRef and check the flag Persistent Reference. Then double click on each of the other disabled objects and on the parent tab, select this parent Ref you just created. Then in your script, likely as a result script for a quest stage add the bit of code

That will enable that parent and then all the other objects with enable with it.

On another note, if there are things you want to disable at the same stage, link them to the parent ref the same way, only check the box "Set Enable State to Opposite of Parent" and they will disable when you enable the parent Ref.

Good Luck!

Link to comment
Share on other sites

I've got another quick question then. I'm using a spell to test that everything gets enabled corecttly, however, it wont seem to work.

here is the script:

scn AADarksTestSpellScript

short doonce

begin scripteffectstart

if doonce == 0

AADarksBasicLightParentRef.enable

elseif doonce == 1

AADarksBasicSuppliesParentRef.enable

elseif doonce == 2

AADarksBasicFurnitureRef.enable

elseif doonce == 3

AADarksBasicLightParentRef.disable

elseif doonce == 4

AADarksBasicSuppliesParentRef.disable

elseif doonce == 5

AADarksBasicFurnitureRef.disable

endif

end

begin scripteffectfinish

if doonce == 0

set doonce to 1

elseif doonce == 1

set doonce to 2

elseif doonce == 2

set doonce to 3

elseif doonce == 3

set doonce to 4

elseif doonce == 4

set doonce to 5

else

set doonce to 0

endif

end

The purpose of the spell is that different things are enabled everytime I cast it. I've tried different variations but all that seems to be enabled is the reference that I put first, any othere references dont enable. If anybody has any ideas why this is, they would be much appreciated.

-Dark

Link to comment
Share on other sites

Hmm I'm guessing you're variable is being reset each time the spell is cast, so the counter isn't incrementing. If that's the problem just turn it into an object script instead of a spell. If you use the OnEquip block, then put the script on say a ring it should be easy enough to use.

WT

Link to comment
Share on other sites

How exactly do you want this to work?

A spell script will ONLY execute in a cast spell. Spell scripts DO NOT retain any value you set in the variables that are declared inside that script. You would need to keep track of the 'doonce' variable from a GLOBAL VARIABLE.

Normally, you enable things when you purchase a deed. There are a number of things that must be done, exactly like the existing deeds you can buy in the game when you do it this way.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...