Difference between revisions of "FAQ: My Script Doesn't Work!"

Jump to navigation Jump to search
572 bytes added ,  15:41, 10 February 2012
no edit summary
imported>Jimhsu
imported>Jimhsu
Line 65: Line 65:
*Explanation: Casting will only work if the reference casted actually has its script attached. For instance, the TestReference base object needs to have the TestReference script attached in the editor form window for it to be castable from ObjectReference to TestReference.
*Explanation: Casting will only work if the reference casted actually has its script attached. For instance, the TestReference base object needs to have the TestReference script attached in the editor form window for it to be castable from ObjectReference to TestReference.
*Solution: Use the editor and attach the script to the object you're actually casting. For instance, if TestReference is supposed to refer to a book, open up the book you want to cast in the editor window, goto the scripts section, and attach the TestReference script from there.
*Solution: Use the editor and attach the script to the object you're actually casting. For instance, if TestReference is supposed to refer to a book, open up the book you want to cast in the editor window, goto the scripts section, and attach the TestReference script from there.
==Quests==
===I can't get my alias to point to a reference ===
*Several possibilities here:
**'''The reference doesn't actually exist.''' Did you make sure that a PlaceAtMe command actually generated a reference? Check using Debug.Trace(theReference).
**'''An alias is pointing to an object in a container.''' Evidently this does not work (creating a persistent reference using PlaceAtMe, and pointing the alias to the persistent reference). Solution: don't put the object in the container, or point to the container and get the object that way (not completely tested).
Anonymous user

Navigation menu