sgn15's Recent Forum Activity

  • brunopalermo

    I would like to ask if that greatmethod you used also works if the game is exported as exe (node webkit)?

    Fiammaoscura

    nice game

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You either used another trigger condition (with green arrow) or you used trigger once. trigger conditions will disappear from selection if you already have another trigger condition in your event.

  • zardaloop

    I would suggest set all bullets to disabled at the start (bullet properties in sidebar) and enable them using events so you're sure there's nothing flying around when you don't need it. Of course you need at least 1 instance of the bullet object (or rocket in your pic) either in this layout or somewhere else in your project.

    You can adjust all bullet parameters to make it arc even more

    Angle of motion is different when facing left or right (you should know how to count degrees)

    start at 0 degrees at right

    counterclockwise is adding 1 degree

    clockwise is adding -1 degree

    360 degrees in 1 full circle

    360 degrees same as 0 degrees

    research on this if you're not a numbers person

    Set Bullet's "Set Angle" to Yes (bullet properties in sidebar) to angle the sprite of the rocket similar to angle of motion

    Use the sign next to my name (like I did to your name in this post) and I will get a notification and I will reply to you again.

  • Is the "Set Angle" of bat set to yes?

    If the bats are just moving horizontally, I would suggest setting it to No so you have more control on the appearance of the bats.

    Can't you just use "on collision" or "overlapping" then "bounce off" and "set mirrored" ?

    If you want to mirror it when facing left and not mirrored when facing right, you can use that (being mirrored or not) as condition for hitting against a solid to decide whether to mirror after bouncing or not.

  • Is the bat using platform behavior or did you mean it's a bat in a platformer type of game?

    If using platform behavior, take note of your gravity, if it doesn't float, try gravity = 0 first.

    Note that platform objects will still fall even if no gravity (free fall) unless platform behavior is disabled.

    You can also use other behaviors for flying, like bullet behavior (which also has a gravity parameter).

    You can adjust the gravity if you want the bats to fall down to the ground (if you are supposed to hit them in your game).

    Not enough info like how you coded the fly (so I can't know why it doesn't work), how your game works, etc.

  • thomas Harding

    I can't make something out of those large pics. I mean just a simple diagram made from MS paint or a screenshot of your layout view in C2 would help explain what happens in your game (aside from what you have explained so far) since you said the sensors did not worked out so well. I don't know how you did it specifically.

    Aside from sensors, you can also check your distance (between player and enemies) as another condition for enemy AI.

    You might also want to use instance variables to store the direction an enemy is currently facing. So an enemy who is facing right that overlaps a sensor will go left, while an enemy facing right that overlaps sensor will go left. something like that.

    Try to summarize the things you want to take into account with in the AI mentally or in a piece of paper before trying to code them. Good luck.

  • Platform behavior objects can use "has a wall (to left or right)" condition. You can use that combined with a key press condition. Check if it works with gravity or with no gravity.

    Note that platform objects will still fall down even if gravity = 0 if not on top of solid or jump thru. Set Vector Y = 0 to stop moving vertically (though you want to go up or down when beside a wall, so you probably don't need this)

  • I did not download the file because I'm not on a pc with C2, but I also had a situation like that before, I just spawned a jumpthru object right on top of solid but the jumpthru is 1 pixel taller than solid

    I think solids have a problem if they overlap each other

    and make sure (using debug) that the solid you are disabling is the correct instance

  • Just set angle of motion, gravity, speed and acceleration for any object with bullet (make sure you enable it at time of created) and it would work like you wanted.

    No need for equations or variables.

    Set "Set Sprite Angle" to Yes so the object would automatically angle according to its "angle of motion".

    And yes, I have made it to work like that. It's simple.

  • floor(random(5)+1 will result in 1,2,3,4,5

    Better yet, skip the random and use

    choose(1,2,3,4,5) = 1

    this means 20% chance (or 1 out of 5 chance) of choosing 1st car, then do the same for other cars

    choose(1,2,3,4,5) = 2

    choose(1,2,3,4,5) = 3

    choose(1,2,3,4,5) = 4

    choose(1,2,3,4,5) = 5

  • Can't you just use vector x when ball is on floor when the solid (floor) it is on top of's angle is not = 0 ?

    As for the spinning animation, you should put your axis in the middle of the ball and just rotate your ball's angle (again when the floor's angle is not zero and ball is on floor).

    you might need to use some instance variables to set if going left or right (or just check the angle of the floor)

sgn15's avatar

sgn15

Member since 20 Sep, 2013

None one is following sgn15 yet!

Trophy Case

  • 11-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Email Verified

Progress

14/44
How to earn trophies