MadTod Posted January 14, 2014 Share Posted January 14, 2014 Quick question: How do I make a static object appear and disappear using an activator? Any help would be very much appreciated, thanks. Link to comment Share on other sites More sharing options...
Terra Nova Posted January 14, 2014 Share Posted January 14, 2014 (edited) By attaching a script the static reference in the render window, and having an activator call disable/enable on it. Put this script on the static reference: Scriptname StaticEnableStateScript extends Objectrefence Activator property myActivator auto AUTO STATE DisablePhase Event OnActivate(Objectrefence akActionRef) if akActionRef == myActivator self.Disable() gotoState("EnablePhase") endif EndEvent ENDSTATE STATE EnablePhase Event OnActivate(Objectrefence akActionRef) if akActionRef == myActivator self.Enable() gotoState("DisablePhase") endif EndEvent ENDSTATE Edited January 14, 2014 by Terra Nova Link to comment Share on other sites More sharing options...
MadTod Posted January 14, 2014 Author Share Posted January 14, 2014 The Script keeps failing, I copied it to the letter. It says "cannot compare a objectreference to a activator" on lines 8,15 and 17,15 which in my case are: if akActionRef == THESilverPlatter01Activator What do I do? Link to comment Share on other sites More sharing options...
mellowtraumatic Posted January 14, 2014 Share Posted January 14, 2014 There's already a script in the CK that can toggle objects on and off. I've used it with lights, candles, water, and sounds before. it's called defaultactivatetogglelinkedref. You add that script to your activator and then in the Linked Ref tab, you choose the object you're turning and off. Link to comment Share on other sites More sharing options...
MadTod Posted January 14, 2014 Author Share Posted January 14, 2014 (edited) That works thanks, though I can't seem to link more than one object, I'm planning on linking lots objects. Solved it, I linked the activator to an XMarker and then made that the Parent of the objects I want to toggle. Edited January 14, 2014 by TanisDuncan Link to comment Share on other sites More sharing options...
mellowtraumatic Posted January 14, 2014 Share Posted January 14, 2014 Well, I've done it with multiple lights. You just have to pick one object to be the parent object, and then link all the others to that one. I learned how to do that by watching this tutorial. http://www.youtube.com/watch?v=rfx8hEl7KEw Hope it helps! :smile: Link to comment Share on other sites More sharing options...
MadTod Posted January 14, 2014 Author Share Posted January 14, 2014 I've done it, thanks. Link to comment Share on other sites More sharing options...
mellowtraumatic Posted January 14, 2014 Share Posted January 14, 2014 Glad to help. Edited to say: That's what happens when I'm typing out slowly on my phone. I'm mapping out a solution without noticing you already worked it out yourself. :laugh: Link to comment Share on other sites More sharing options...
Recommended Posts