Jump to content

Help a new modder!


Omeletter

Recommended Posts

Hi all,

I have tried to make a switchable candle using a modders resource Misty Hideout mod. If you go into the construction set look at the candlestick 01 in there, this is the object with candlestick 01 script I ve used (don't forget about candlestick 01 light!).

Here I'll show you what this script contains and what I tried to do.

Misty Hideout script

scn trfehCandlestick01Script

 

begin OnActivate

 

if ( trfehCandlestick01LightRef.GetDisabled == 1 )

trfehCandlestick01LightRef.enable

else

trfehCandlestick01LightRef.disable

endif

 

end

 

My Script (Yes I have already created TestCandle and TestCandleLight)

 

scn TestCandleLight01 Script

 

begin OnActivate

 

if ( TestCandleLightRef.GetDisabled == 1 )

TestCandleLightRef.enable

else

TestCandleLightRef.disable

endif

 

end

 

This gave me an error on line 6 that says "Syntax Error, Invalid reference TestCandleLightRef (Only object references and reference variables are only allowed in this content)"

 

What should I do, how to create a "Reference", What I am doing wrong :( ? Please help me!

Link to comment
Share on other sites

. . .

This gave me an error on line 6 that says "Syntax Error, Invalid reference TestCandleLightRef (Only object references and reference variables are only allowed in this content)"

 

What should I do, how to create a "Reference", What I am doing wrong :( ? Please help me!

Quick and dirty definitions:

Base Object s: everything in the CS Object Windows

References : everything in the world (references to those base objects)

 

Example:

Under Ingredients, you have "Apple" (a Base Object)

Suppose you drop 3 apples in a bowl (creating 3 References) and want to enable/disable them individually by script.

To use them in a script you have to name those 3 References and make them persistent.

If you follow Beth naming conventions, you may name them AppleRef01, AppleRef02 and AppleRef03.

Now you can use AppleRef01.Disable, AppleRef01.Enable etc.

 

That said: the error message is telling you that, either, you did not create a Reference named TestCandleLightRef or you created it, but did not make it persistent (a checkbox at the bottom of the CS Reference Window).

Link to comment
Share on other sites

  • Recently Browsing   0 members

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