keepee's Recent Forum Activity

  • It might have been because of how you returned the movement angle..

    doing it the ways I mentioned above means that up is returned as -90, (not 270).. it was probably the same for the way you originally set it up.

    anglediff works regardless of whether you put in -90 or 270 or even something like -1000..

    I think it's the same for other angle related expressions/actions like anglelerp and 'is clockwise from' for example.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You'll want to search the manual entries for loops!

    It'll explain what you need a lot better than me.

    but for example, your events could also be done like this:

    +Repeat 7 times

         ->System     |wait loopindex*0.05 seconds

         ->Enemy2      |Spawn EnemyBullet on layer1

         ->EnemyBullet      |Set angle to 180-(loopindex*10)

    edit: but you'll need to make sure this repeat event isn't run every single tick, otherwise you'll have thousands of bullets.. putting a "trigger once" condition above "repeat.." may be okay.

  • It shouldn't be too hard if you want it to simply trace the players footsteps

    add global variables, something like "lastGridX" and "lastGridY"

    and in the events:

    when a condition for moving the player to a new grid space is met,

    set LastGridX/Y to it's current position, *before* moving the player to it's new space.

    and then set the followers position to the grid space in the LastGridX/Y

    There may be a simpler way though, if your game is turn-based for example you can, on the start of a turn just set the followers position to the players position before moving the player to his new spot.

  • Hi, sorry but If you upload your .capx file somewhere, I'll see if I can modify it and repost.

    It'll be a lot easier to see what exactly the problem involves!

  • First off what's the 'angletracker' actually doing? What's sprite9?

    there might be a better way of finding the angle of movement.

    (I'll just use the player/enemy object name: 'Body' cos it's what I'm used to)

    for example with platform behaviour you can just use:

    Body.Platform.MovingAngle

    and for a physics object you can use:

    angle(0,0,Body.Physics.VelocityX,Body.Physics.VelocityY)

    I haven't downloaded your cap because of the additional plugins, but also, you could try using 'anglediff' inside compare two values.. instead of 'is between values'. I find this generally works out any kinks with comparing angles

    for example:

    +For each Body

       +system, compare two values: anglediff(Body.angletracker,0) is less than 45

          ->set animation... etc

       +system, compare two values: anglediff(Body.angletracker,180) is less than 45

          ->set animation... etc

    as you've probably guessed, this checks to see if the movement angle is within 45 degrees of 0, or if it's within 45 degrees of angle 180

    -180 is Left, -90 is Up, 0 is Right, +90 is Down, and +180 is left again.

    If you want to use 8 directions, then just use the angles inbetween and 'is within 22.5 degrees of x' instead

  • updated my version

    It uses an array now:

    You can copy and paste the Questions and Answers from a spreadsheet like this:

    Pic!

    works with any number of answers now for each question, as long as the array is set to the right size.

    capx!

  • It is that easy, it's how I'm doing the character animations in the game i'm working on.. Although I've only animated two so far, but it's pretty robust and I'd be surprised if I run into any problems down the line while adding more.

    It may take a long time to put all the animations into one object but it'll be worth it for the cleaner event sheet at the end.

    just my suggestion :p

  • You must have missed something..

    It won't keep adding if it gets reset back to 0 at the start of each tick.

  • Use the for each (ordered) condition to pick the lowest

    +For each Sprite, order by sprite.Y descending

         -> Stop loop

         -> ScrollY to lerp(scrolly,Sprite.y, dt*Speed)

  • Not sure why this thread hasn't been replied to

    it seems pretty simple..

    "TotalHealth" sounds like it should be a Global Variable, as it won't actually differ between any of the instances...

    +every tick

         ->set TotalHealth to 0

    +For each Family1

         ->Add Family1.Health to TotalHealth

    This should work.

  • I don't think it's possible..

    But if all of your character animations were contained within one object, it would be.

    A little awkward though... but once you've set it up, and if you name your animations correctly, you can set them like this:

    +If character is moving right

    ->set animation to Character.Name&"Right"

  • Yes, it is..

    I can't really tell you any performance tips that won't be in the manual.. It'd be nice to know exactly how the collision checks actually work.

    If you happen to be checking between 2 circular objects, you can simply compare distances instead though.

keepee's avatar

keepee

Member since 6 Jan, 2012

None one is following keepee yet!

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies