arandomperson23 Posted March 20, 2016 Posted March 20, 2016 I've been working on a mod and I can't get my script to compile. Scriptname SF_AADBDoorexplode_01001D88 extends Scene HiddenActor Property Player AutoReferenceAlias Property Alias_BlackDoorAlias Auto;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment;NEXT FRAGMENT INDEX 9;BEGIN FRAGMENT Fragment_2Function Fragment_2();BEGIN CODEBlackDoorAlias.SetOpen(true);END CODEEndFunction;END FRAGMENT;BEGIN FRAGMENT Fragment_0Function Fragment_0();BEGIN CODEgame.DisablePlayerControls(abCamSwitch=true)game.ForceThirdPerson()game.SetPlayerAIDriven(true);END CODEEndFunction;END FRAGMENT;BEGIN FRAGMENT Fragment_1Function Fragment_1();BEGIN CODEGame.EnablePlayerControls()game.SetPlayerAIDriven(false);END CODEEndFunction;END FRAGMENT;END FRAGMENT CODE - Do not edit anything between this and the begin comment It's failing on "BlackDoorAlias.SetOpen(true)" saying BlackDoorAlias is not defined even though it's clearly defined above as a ReferenceAlias and in the quest. It's the same alias used by the rest of the Dark Brotherhood scripts so I'm not sure why it doesn't work in mine. Any help? Edit: I'm using MO and I've been seeing errors about not supporting 64bit binaries. Could that be affecting the compiler? I saw a mod earlier that patched the ck binary to stop that but I didn't think I needed it since I haven't had trouble compiling other scripts.
Guest Posted March 20, 2016 Posted March 20, 2016 .SetOpen() is a function defined on ObjectReferences, you are using a ReferenceAlias. A ReferenceAlias cannot be set to a door. An ObjectReference can. Probably you need to change: ReferenceAlias Property Alias_BlackDoorAlias Auto to: ObjectReference Property ref_BlackDoor Auto
arandomperson23 Posted March 20, 2016 Author Posted March 20, 2016 That did it! Strange though, the quest where I got that line from (way of the voice) has it both ways. It's a ReferenceAlias and an ObjectReference. I wonder why it needs both? Anyways, thanks for the help!
Guest Posted March 20, 2016 Posted March 20, 2016 If you need it as map marker to find the object, then you need it as ReferenceAlias. But if you need to operate on it then you need it as ObjectReference. Special case are Actors, because you can get directly the Actor from a ReferenceAlias, and an Actor is an ObjectReference.
WraithSlayer Posted March 20, 2016 Posted March 20, 2016 Also keep in mind you can access the ObjectReference inside a ReferenceAlias by calling GetReference() on it.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.