Jump to content

How do I use enable/disable in scripts?


Recommended Posts

Ive been trying to figure out how to use enable/disable scripts by looking at some examples, but I still can't figure it out

image.png.e2429d5fd27af906592722c5ddb01f0b.png

image.png.f12e0aa98389341a27140fe09c64e9bb.png

Basically I'm trying to disable the FXElectricArc01 called 7arch1, but it says "Script command "7arch1.disable" not found."

Link to comment
Share on other sites

good practice to add "ref" at the end of every reference ID to differentiate the base IDs from the ref IDs. Your script command is accurate in itself, but it might be trying to disable a baseID instead of your ref because of that? I'm not sure how it would let you save your ref ID if it was a duplicate, but maybe just try adding the "ref" at the end, saving your reference, then try calling it properly in the script and see if that fixes your error (or gives you another one).

But like I said, your "refID.disable" in itself is correct.

Link to comment
Share on other sites

Use a combo of letter to designate your content mod. For example T(ea)P(ot)M(an)originalbaseID. This would be easier to figure out which is your content, and which is original or other mods (in case you messed with a common module like TTW or FNC etc). It would look easier to recognize at 1st glance instead of checking id number, Beside, if you change vanilla assets it wouldnt show in number.

 

 

  • Like 1
Link to comment
Share on other sites

8 hours ago, laclongquan said:

Use a combo of letter to designate your content mod. For example T(ea)P(ot)M(an)originalbaseID. This would be easier to figure out which is your content, and which is original or other mods

Yup, most mod content I've created has AoM in the name for that reason, no matter what game I've made it for.

Link to comment
Share on other sites

Sometimes I go crazy and use a too bloody long id. Havent met troubles with it though.

Although, if you duplicate carelessly and the id is like

originalidrefDuplicate000

the way it sometimes happen when we duplicate a bunch of things, it might cause troubles. The part ...Duplicate000 sometimes get ignored by game engine and cause some bugs. It's inconsistent, though.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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