Search the Community
Showing results for tags 'switch'.
Hey everyone, i'm really new at this so please be understanding. I'm trying to write a Script to open a Door with a floorswitch. The idea is to drop a box and activate the switch. I'm using the prefab boxes and the SlidingDoor.Lua. I saw this video below but the problem is that the script works only if you put the value name in the Script function Script:Collision (entity, position, normal, speed) if (entity: GetKeyValue ("name") == "crate_small") then self.component: CallOutputs ("Open") end end but what i want is to be able to assign or to change th
I'm in the process of making my first game, so i went to Leadwerks and started creating things. The problem comes when I want to make that a door opens when 2 pressure plates are activated. So, i wrote this code to create a "switch" that requires 2 inputs to output a signal to the door (in the flowgraph editor), but it doesn't work... function Script:Start() bool1 = false bool2 = false end function Script:Input1() --in bool1 = true end function Script:Input2() --in bool2 = true end if (bool1 == true and bool2 == true) then self.component:CallOutputs("Output