Altrunchen Posted April 12, 2012 Share Posted April 12, 2012 So what I'm trying to do is make a script that allows a player to use an activator in game so as to enable or disable an effect that is linked in some way to the activator. I would really appreciate it if someone would please help me with this. Here is my attempt so far: Scriptname FXToggleSwitch extends ObjectReference {This is to allow effects to be toggled in game with activators.} ObjectReference function SwitchObjectReference function EffectInt Property Duration Event OnActivate(ObjectReference Switch) Effect.enable (duration)Endevent Here are the error messages: Starting 1 compile threads for 1 files...Compiling "FXToggleSwitch"...c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\FXToggleSwitch.psc(4,31): mismatched input '\\r\\n' expecting LPARENc:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\FXToggleSwitch.psc(0,0): error while attempting to read script FXToggleSwitch: Object reference not set to an instance of an object.No output generated for FXToggleSwitch, compilation failed. Batch compile of 1 files finished. 0 succeeded, 1 failed.Failed on FXToggleSwitch Link to comment Share on other sites More sharing options...
fg109 Posted April 12, 2012 Share Posted April 12, 2012 You really need to read some scripting tutorials... Scriptname FXToggleSwitch extends ObjectReference {This is to allow effects to be toggled in game with activators.} ObjectReference Property Effect Auto Int Property Duration Auto Event OnActivate(ObjectReference akActionRef) Effect.Enable() Utility.Wait(Duration) Effect.Disable() Endevent Link to comment Share on other sites More sharing options...
Recommended Posts