HELP if statement problem
Posted: Sat Apr 04, 2015 1:12 pm
Hello, I have a weird problem,
code :
.. code continues..
If I click Case1 in game, it does someting, but Case2 does nothing (getPressed() always returns correctly).
Simply, it only reacts on a first if statement. If I put Case2 as first if, it only reacts to Case2. Any help please ?
code :
Code: Select all
function casesUpdate()
if getPressed() == 'Case1' then
selectedCase = images.cases.case1
first = true
load = 'case_open'
end
if getPressed() == 'Case2' then
selectedCase = images.cases.case2
first = true
load = 'case_open'
end
If I click Case1 in game, it does someting, but Case2 does nothing (getPressed() always returns correctly).
Simply, it only reacts on a first if statement. If I put Case2 as first if, it only reacts to Case2. Any help please ?