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")
end
what i'm doing wrong? i'm very new in programming