pmurph's Forum Posts

  • After a bit of a hiatus on the project, i've went back and had a look. Now i realise i didn't word myself properly. It's not that he automatically rotates towards the center of the screen, it's that as you pass the center of the screen on the X axis, he 'points' towards the middle of the x/y axis, only when you leave off the mouse though, as the player is supposed to rotate towards mouse.x and mouse.y every tick

  • Indeed, take your time!

  • Thanks david, sorry my reply took so long. Internet connection has gone haywire! I'll have a serious look through my event sheet.

    Paul

  • Hi, I've realised that while using 8-direction movement on my player object, he automatically rotates towards the center of the screen when he moves to the top, bottom , left or right of the screen.

    I have the Set angle action towards Mouse.X and Mouse.Y so ideally the player would be constantly looking at the mouse position instead of this unwanted behaviour. Any ideas folks?

    Thanks, Paul.

  • Also I'm taking a look at the events tutorial in your signature and it seems to suggest it might answer some of the questions i've had as a new construct user, thanks for taking the time to write it up.

    Paul

  • Thanks for the reply Guizmus, I may be misunderstanding you but the problem is that when i launch the ball with the left mouse button it should pass through the wall, and when i use the right button to fire it, it should collide with the wall and stay in the 'lane' that the player is in. So when i left click, the only way i've been able to have it pass over the wall is to disable solid collisions with the wall in general, which allows my player to also pass through(what i don't want) , the right click isn't a problem off course because i have that set to re-enable the collisions with the wall and thus it works fine even after left-clicking.

    However if i was to left click to pass the ball over the wall, receive it back again and then before i right click to fire it inside the lane i go in the direction of the wall, i pass through it.

    Only once i click the right mouse button again are the collisions re-enabled and that seems to be where my problems lie.

    Also when i refer to collisions now, i'm referring to the solid behaviour and NOT the physics collisions,

    because i've taken all physics behaviour out of the game due to unsatisfactory results with the way the ball moves.

  • Hi guys, i recently changed my game from using physics behaviour to using bullet instead because the physics were becoming quite erratic.

    The problem is , i had a system where when the left mouse button was clicked it would launch a ball which could pass over 'walls' i had in the game(Via on left-button clicked>Disable physics collisions with 'wall')

    This not only allowed the ball object to pass through/over the wall, but also didn't stop the player from being unable to pass through it(something i want). Now , since switching to the bullet behaviour , the problems i had with the movement of the ball being slightly erratic are gone, however the only way i can find of doing what i did before is to disable solid collisions when the left mouse button is clicked, this sadly allows the player to pass through the wall too and i don't want that happening at ANY point during the game.

    Can i make the solid wall permanently affect the player , but not the ball when the left mouse button is pressed?

    Thanks,Paul.

  • Blacksmith , Probably a good call. I'll mess with it a little and see if i can coax it into working. If i can't be later on today i'll post it, wouldn't wan't to flood up the forums!

    Paul.

  • whoooops forgot the capx ,https://dl.dropboxusercontent.com/u/151998804/TowerDefense/RandomTowerDefense.capx , Thanks Blacksmith! Couldn't have got it working without your help. :)

  • dl.dropboxusercontent.com/u/151998804/TowerDefense/index.html

    Seem to be having a problem with this wee prototype where the pathfinding isn't working at all like i thought. The path is at the start of the layout set to Tower.X and Tower.Y ,

    the enemys all move differently despite being symetrical and being the same object.

    Not to mention they group to the left hand side of the tower instead of gathering around it, The image point in my tower is set perfectly in the middle of the square too. I feel like i'm missing something glaringly obvious here.

    Paul

  • Ah, i figured out a workaround. Just adding the wait 1.0 seconds as a condition instead of an action directly after the number was added to the variable(What i was trying to do before)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Blacksmith , Thanks, I was never entirely sure how the whole username thing actually worked. And it's not so much that i'm having problems with what i originally said i wanted to do, it's adding a value to my variable and working perfectly in that regard.

    It's just that it seems to be constantly adding 1 to it as though it were every tick, which i'm fairly sure isn't one of my conditions here.

    Paul.

  • Hey blacksmith, thanks that cleared things up a hell of a lot. When you say to add the player and enemy values , do you mean to add them as parameters for the distance part of the equation? In the parenthesis i mean?

    I tried to add them after but it didn't work, so i added them in place of the (presumably) stockholder x1/y1 parts. I managed to get that part working and hooked up to a variable in text form on the screen just to test it, but the number shoots up at lightning speed so i still need to work that out. I figured a wait action would work but i think i'm placing it somewhere where it's doing nothing.

    Thanks again for your help.

    Paul.

  • Is it something to do with variables? Also if anybody can think of any particular tutorials on this subject, not to mention any decent general help websites for this kind of mathematics, As i'm not particularly well-versed in it(although eager to learn)

  • Thanks for such a fast reply, i'm a beginner so i guess i'm just not following too well at this point. I think i understand how such a condition would actually work, but i'm not at all sure how to add this condition.

    What i mean is i know to click add condition, then a list of possible conditions to add will appear , but which of these should i choose in order to enter the enemy.x/y coordinates and the tower ones. I thought it would have something to do with the whole compare x and compare y thing, but i can't seem to use either that or the compare width and height. It simply won't take those values, i assume i'm doing it wrong?

    Thanks for your patience.