How do I...

0 favourites
  • 2 posts
  • Hi!

    I am a noob when it comes to C2 and my problem is this: I want my my bad guy to throw an object at my main (player controlled) hero, when he sees him.

    What would you recommend: something with "on path" to make him move on a route? But how do you make him throw the object since you r not doing it yourself by pressing any mouse button? Line of sight, maybe? Is there any good tutorial on this problem?

    /Jens

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You have to set up an event and add conditions to make your bad guy throw an object at the time you want.

    ths condition could be based on distance, line of sight, or whatever else you think is important.

    example:

    (event and conditions)

    badguy is mirrored

    system compare two values: player.x < badguy.x

    System compare two values: distance(player.x,player.y,badguy.x,badguy.y)< 200

    system every 0.2 seconds

    (actions)

    • badguy spawn bullet
    • bullet set angle towards player
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)