Hello Guys!!!
Defold it is amazing!!! i never had make a professional game before!!! But Defold (and you too, guys haha) allow me to do one with a easy step-to-step! super cool!
But comming back to reality… I have a new problem.
This is my game situation:
My problem:
My controls are working very well by key board and by mouse click. But aren’t working well by touch screen. When using keyboard the girl can run and cast her fire, at the same time. But by using touchscreen she can OR run OR cast her fire. never both together.
Here is my input commands:
Here is my pad (left/right) function to handle the touch action:
function on_input(self, action_id, action)
if ( action_id == hash("click") or action_id == hash("touch") ) and action.repeated then
if inMyArea(self,action.x,action.y) and pointToRight(self,action.x,action.y) then
self.canAct = true
self.pointToRight = true
self.pointToLeft = false
end
end
Here is my fireButton function to handle the touch action: (the red one)
function on_input(self, action_id, action)
if ( action_id == hash("click") or action_id == hash("touch_btn1") ) and action.pressed then
if inMyArea(self,action.x,action.y) then
self.canAct = true
end
end
end
What am I doing wrong? any ideas?
Thanks!