heliogame's Recent Forum Activity

  • I just started and already got lagging. Nothing special in my code, but i believe it is because of multiple collisions. I do not know. Look at it

    It starts lagging when the bullet collides with the object.

    My layout 1708, 4000 is almost empty. I have 3 boxes (2 kinds) , 2 bullets, sprite, ground 2185, 250

    I even cannot understand why it counts 111 objects when I have in reality 10-15. I had about 80 objects, but I removed them in the past.

    Testing with Chrome. Card: Mobile Intel 4 series chipset

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • perfect

  • Bundle them all together, no overlap ever possible.

    [attachment=0:2qfz8hol][/attachment:2qfz8hol]

    Last "else" statement is there if you want to add a default direction.

    oh , thanks

    almost done

    Now, whether he is turned left or right , he is always shooting right. How can I set it to shoot left when is looking to the left?

  • You should nest those conditions...

    On D pressed  >>  (player) Spawn bullet
       if up arrow is down
           if left arrow is down  >> (bullet) Set angle to -135 degrees
           else if right arrow is down  >> (bullet) Set angle to -45 degrees
           else  >> (bullet) Set angle to -90 degrees
       else if down arrow is down
           if left arrow is down  >> (bullet) Set angle to 135 degrees
           else if right arrow is down  >> (bullet) Set angle to 45 degrees
           else  >> (bullet) Set angle to 90 degrees[/code:17dpfl5w]
    

    This is a great logic, though the system does not allow to put "else" after the first condition.

    I made the following split

    It perfectly worked for 6 directions, except of right and left.

    By the way, how can we add left and right direction to this code? We now have an overlap with these buttons if we separately assign to them left and right directions.

  • Hello guys,

    I managed to create events for diagonal shooting, but there is an overlapping of buttons when we, for instance, shoot Up and Up+Right. Look at my code (event 10 and 15 )

    And this is what we are getting as a result when we shoot up+right (here you see that bullet UP direction is triggered as well)

    So, how can I exclude UP shooting from the event UP+Right direction (event 10)?

    Or maybe there is a more simple method of diagonal shooting..

heliogame's avatar

heliogame

Member since 14 Jan, 2015

None one is following heliogame yet!

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies