Two actors using mouse button down. Bad idead.

Hi all, good morning.
I just have implemented the camera sliding effect, it works with mouse button down, an motion linear velocity x same as template.
But i want to do it on the template of canon, then the canon uses too mouse button down.. and when you start to shoot, you shoot and move camera at same time.
If i use touch pressed for canon, then i can't graduate correct values of power because my touch dont is near the canon.

What is the best way to do that? create another invisible actor, front of canon working with touch pressed?

Comments

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    Use a key press in conjunction with mouse to use cannon.

    So

    Rule

    When: key F is down and when mouse is down

    Cannon behaviors.
  • mrpacogpmrpacogp Member Posts: 400
    edited December 2012
    Yes, i have tested that way and got a correct behaviors for my cam and my canon.
    But i want to do it fun, and playable, on an a iphone you cant press f, maybe... some actor called fire activated ?
    When i select a bomb, then you cant move the cam...same as angry really?
    thank you very much for help me :)
    YAY works amazing!!
    Thank you FryingBaconStudios!!
  • famekraftsfamekrafts Member, BASIC Posts: 834
    Same thing happens with touch pressed, the problem is its interacting with both together. simply put an attribute or make the cannon selectable with a highlight graphic. When that is selected makes a Boolean true. When it's true the mouse won't drag. Deselect it and the the mouse will drag. This way you can also control, if the mouse touch is some area away from the cannon, say + 30x then you can make the Boolean false and the mouse will drag.
  • mrpacogpmrpacogp Member Posts: 400
    Thank you too wickedsunny for your support.
Sign In or Register to comment.