• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Trigger code in Unity for Switches? Need some help please.

hernanxx

Refugee
Hi, I've been building mods for a while, I'm making a collection to be released soon.

Recently I was able to make working doors after watching a YT video, even double doors.

I'm now strugling a bit about making a working tv or lamp, I haven't found any manual o anything about that.

In Unity, for doors animation you have "OpenTrigger" to trigger the action, and scenes such as "CloseStatic", "Open", "OpenStatic" and "Close" but I can't figure out what is should be for say, a working TV, what's the trigger for switches?

If anyone has an idea or know of manuals or something it will be appreciated.

BTW Sorry if this has been asked before, I searched but didn't find anything. Thanks

 
SwitchTrigger and SwitchActivated. Activated is the on/off parameter, and the trigger is the event so you always use both properties but set activated to true or false depending on if you want it on or off.

 
Back
Top