kriand's Recent Forum Activity

  • TheSynan you have all those functions and behaviors in C2 too. Without doubt.

    EDIT: here a capx: https://1drv.ms/u/s!Ap_-qxoGKbDcgRnUIXqxRHoZ_oj-

    Its true, the 'timer current running' is not avaiable in C2

  • Hey willhay108,

    right now your code looks like a mess to me. I can see the event where the Sprite5 is set to the catapult (if is_aiming=1; which means 'every tick when its true), but i can not see this for your planet.

    I suggest you put all projectiles into a family or you create just one sprite with different animations and then use the event, which already works.

  • Hey Exion,

    its because the sub-events of the for-loop do not specify which button to turn blue. Right now it says: is there a button that matches the condition? -> turn each one blue.

    Try this:

    I suggest to create another instance variable 'TotalCost' for your BatchBuyButton, so you dont need the division 'Cash/10'.

  • Hello case4891,

    its cause you have no event that hinders the player from moving. Deactivate 'Default Control' in the Platform properties and add the actions 'simulate pressing left/right' to the events where you are pressing the arrow keys.

  • mattshallow the code itself works in C2 but you can not open it there.

  • Hey mattshallow,

    do you want the hawk to aim the touched spot or should it always turn in the direction of the touched worm? Maybe this example helps you out:

    https://1drv.ms/u/s!Ap_-qxoGKbDcgRiC-AqC8wYQe4_-

    (open in C3 - https://editor.construct.net)

  • Hey rbailey83,

    its me again. As i said in the other thread, you need to multiply enemy.width e.g. enemy.width*0.3 to reduce the distance.

    If the enemys width is 50 and it is mirrored, the width will be -50. + (-20) it turn out to be -70 and not the wanted -30.

    I have made some other changes.

    Look if you like it and play with the values a little bit.

    https://1drv.ms/u/s!Ap_-qxoGKbDcgRbvPycA-qNowq-H

  • Hey rbailey83,

    i can not open your file because of the addon. But what i can see from your screenshot, it is not that hard:

    For offset comparison, use the enemys width (*x, if needed), as it automatically becomes negative when it is mirrored.

    So he attacks in both directions. For the movement of the opponent, you simply set another condition,

    which also asks if player and opponent overlap at offset.

    EDIT: If the x-offset is too high, it can happen that the enemy wont attack the player when both have nearly the same x-position

    and dont overlap at offset anymore. Make sure that the gap between offset x/-x is not greater than the players width.

  • I used Construct 3 (https://editor.construct.net/) but this is all the same in C2.

    Here the file: https://1drv.ms/u/s!Ap_-qxoGKbDcgRXrUA0f7gK9bizc

    (start on Layout 1)

    Edit: Direction, Stamina and BaseGravity are instance variables i created for the player.

    You can not find those if you have not created them.

  • Hey TheSynan,

    you can do it like this. I added a stamina system which you can use if you want to.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello farsen,

    first of all i suggest to use the distance expression for the distance control: distance(player.x player.y, enemy.x, enemy.y) < X

    For your sounds you can use another random number before choosing a random sound. Give your enemy an instance variable.

    Using an instance variable ensures that each enemy acts individually.

    Then instead of choosing a sound, set the instance variable to choose(0, 1).

    Create a sub-event:

    If instance variable = 0 (or 1) -> play sound choose(a, b, c...)

    Edit: To prevent the enemy from yelping again and again, you can give him another instance variable, add this to the condition and change it in an action.

  • Use 'Has LineOfSight to Player' as the only condition and it automatically runs every tick. But i dont think that you want to spawn two bullets every tick.

    Use the Turret behavior and its setting for the fire rate. If you do not use this behavior, create a sub-event and select 'Every X Seconds' as a condition.

kriand's avatar

kriand

Early Adopter

Member since 28 Mar, 2017

Twitter
kriand has 2 followers

Trophy Case

  • 7-Year Club
  • x3
    Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

9/44
How to earn trophies