Drakkith's Recent Forum Activity

  • It's just a basic event. If sprite's instance variable is 1, then perform action X.

  • Those angles are incorrect. Zero degrees is directly right and angles increase clockwise from there. Down is 90 degrees, left is 180, up is 270.

  • Try (round((21/20)*100)/100

    This will divide 21 by 20, giving you 1.05, multiply it by 100 to give you 105, round to closest integer (if it wasn't already an integer) and then divide by 100 to give you 1.05.

  • You do not have permission to view this post

  • The "rotate towards angle" action will rotate the object X degrees per tick towards Y angle. Try setting your car.car.steerspeed to a low non-zero value.

  • How do you have your events set up to fire the bullet? You should be able to do a "if player is mirrored, then set bullet movement angle to 180" type of event, assuming you're just mirroring the players sprite for left and right movement.

  • Thanks all! I'll try them out and see how they work!

  • Hey all.

    I'm playing around with a tower defense game, and I'm trying to have a turret target all enemies within a range of 100 pixels and shoot a "bullet" at them when the turret is clicked. This bullet is actually a spider-thing that will do damage over time to the enemy, so I want the turret to only target the enemies that don't already have a spider-thing on them.

    Any ideas?

    Thanks.

  • Would this be a sub event? Since this happens after the enemy dies. I'm a bit confused on how to make this happen. Should I make two Global Variables, which is what you mean by Compare two variable?

    I apologize, I just need more clarification.

    Event: Enemy: On Destroyed.

    Sub Event: System: Compare two values: random(100) less than 60. Action: Enemy: Spawn Another Object

    So when an enemy is destroyed the sub event check is triggered. Then the game rolls a random number between 0 and 100 and if the number is less than 60 the check returns as true and the action following it runs. If the number is 60 or above the check returns as false and the action is not run.

    If you want to be able to change what the number is checked against you can create a global variable. Then your action becomes: Compare two values: random(100) less than GlobalVariableName.

  • I'm not sure if Construct 2 supports the reading of a smartphone's accelerometers.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You're going to need to provide more details if you want help. Are you using the 8-direction behavior for the player? Have you got your targeting icon to work properly? Are you wanting to make your player face in the exact direction of the target, or just in one of 8 directions? Etc.

  • you can try:

    1/on event: pirate_ship rotate X°*dt toward angle player.angle

    2/pirate_ship within 5° of player.angle: action (eg fire)

    If that's work, you can improve the rotation and/or distance

    I believe the phrase "player.angle" returns the angle that the player's sprite is facing, not the angle from the current sprite to the player.

Drakkith's avatar

Drakkith

Member since 29 Aug, 2014

None one is following Drakkith yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies