calminthenight's Recent Forum Activity

  • Your character will move up and down also on the first move, but once you have chose an axis it will not move on the other. This is because when you check for overlap at offset on one axis, there is still a slight overlap on the other axis. Overlap at offset is like moving your entire collision polygon by the offset amount, so if you shift it to the left(negative on x) and check for overlap there, if you have a slight overlap at the bottom or top it will still count.

    You can fiddle around with different ways to ensure that there are never any overlaps, or it looks like this project would be well suited to using grid based movement which would eliminate the issue.

  • If the variable is setting correctly then there is nothing wrong with the slider bars. Check that the variables you are using are Global Variables, and that your event sheet for each layout sets the volume to those variables.

    You could even use a separate event sheet for the volume control and 'include' it in all your other layouts.

    EDIT: Also when dealing with volume in decibels (dB) inside Construct 0dB is the maximum volume. So you want to set your minimum and maximums in the negative. Minimum: -99 Maximum: 0

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • To save the variable between layouts and store for closing and reloading:

    On End of Layout - Local Storage: Set Item Key: "variablewhatever", Value: "sprite.variable"

    On Start of Layout - Local Storage: Check Item "variablewhatever" exists

    Local Storage: On Item "variablewhatever" exists - Get item "variablewhatever"

    Else: Set Sprite AnimationFrame to 0

    Local Storage: On Get Item "variablewhatever" - Set Sprite.animationframe to LocalStorage.ItemValue

  • I assumed it was a platform because your project had the gravity set. Very easy to convert the example i showed you to be top down.

  • As dop2000 said, mixing physics and non physics behaviours will most likely result in problems like you are experiencing. Have a look at this quick example where I replaced the 8 direction behaviour with a custom physics movement.

    Using physics on all of the objects will mean that their interactions are all physics based and you won't get issues like overlapping of objects.

    1drv.ms/u/s!AkmrWgxeuxlKhIdPPQ52awAyMooEAw

  • You have conflicting event conditions. You have conditions that say if natural selection is greater than 0 then do x, as well as conditions that say if it is between a range of values then do y but it is still doing x.

    You should create relevant sub events under you initial condition of 'Natural selection is > 0'

    You can also remove the every tick condition from a lot of those events as the other conditions will be checked every tick regardless

  • Without seeing your events I cant be sure, but you could have conflicting movement demands as the enemy moves in and out of range.

    I like to use boolean instance variables that control what state the enemy is in. You can set them with your events.

    eg.

    If Enemy distance to player is less than 50 - set instance variable "Kite" to true

    If Enemy is Kite - (insert your custom kiting movement here and attacks here)

    - sub event - if Enemy distance to player is greater than (whatever you want) set Kite to False

  • To expand on what oosyrag said and because it sounds like you want to ray cast to a range of angles around the player angle, you can use a loop. Something like this:

    On click

    - Repeat 10 times:

    Cast Ray from self.X,self.Y to self.x+cos(self.angle-5+loopindex), self.y+sin(self.angle-5+loopindex)

    This will cast 10 rays at 1° intervals from -5° of the player angle through to +5°

  • You do not have permission to view this post

  • You can use the is within angle, or is between values conditions to compare the moving angle of your enemy using the enemysprite.MoveTo.MovingAngle expression.

    e.g. enemysprite.MoveTo.MovingAngle is between -45° & 45° - Set animation to "MovingRight"

  • The bounce is due to the platformer behaviour continuing the jump action.

  • Use the pick nearest/furthest condition.

    Pick Planet nearest Player X, Player Y

    Set Player Angle of Gravity to angle(player.x,player.y,planet.x,planet.y)

    EDIT: turns out it's a bit more complex than that, to avoid getting stuck between equidistant planets. Have a look at this and see if it is what you are after.

    1drv.ms/u/s!AkmrWgxeuxlKhIdOpvGYVXnAyLV9Jw

calminthenight's avatar

calminthenight

Member since 28 Jan, 2018

Twitter
calminthenight has 6 followers

Trophy Case

  • 6-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

11/44
How to earn trophies