Newbie Question about sprite movements.

0 favourites
From the Asset Store
Minimal Sprite Font with Stroke for Pixel Art games.
  • OK.. I have searched the forums forever and can't seem to find what I'm looking for. I have a character with hundreds of different animations i can get it to walk and stuff with the key board but not the mouse. Using the keyboard works OK, but I would rather have the mouse make the character move, seems much easier for the players... maybe a lot harder on me but that's my fault lol.. I can't get the player to look at the mouse and walk to it, the sprite would have to determine the mouse position the automatically select the right animations.. Hope i have explained well enough for everyone to understand exactly what I'm trying to do...

    If this is already posted please direct me to right place <img src="smileys/smiley3.gif" border="0" align="middle" />

  • here is the file so you can see my char and all the animations, please no making fun of me either. I just need him to move to where the mouse clicks with the correct animations.. please no negative feedback :)

    dl.dropbox.com/u/51931907/loa.capx

  • hi have you looked here?

    faq

    mouse click movement

  • Yes i have seen them, I understand how the single sprites can rotate and go to were the mouse was clicked. I'm trying to use a sprite with animations, if i use that my sprite it just goes side ways and upside down, can't get it to change to a certain animation ans walk towards the correct spot... maybe it can't be done yet with C2... I'm not sure i may be asking to much.. the only way i can do it is with keyboard.. would rather use the mouse but if all else fail's I'll just use keyboard movements.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • And just for the record I'm working on a simple game, not the next Diablo or anything like that, the movements just very important.

  • yeah i see what you mean its gonna be a little tricky, essential what you need is some kind of pathfinding solution, or you could set a target point get the angle of playerposition to target, compare this to the closest angle of posible movement, set angle and then move forward and do that every so many seconds until target is reached... :) just thinking outloud here...

  • Hmm, what if I made a grid of 8 sprite blocks for all the directions.. and click then to make the character start animations then move toward the correct square... In theory it might work if I can keep the character in the middle of the screen... maybe? I'm not sure... any thought on this idea?

  • ah i maybe found another (part of the )answer, use the position of the mouse related to the player, like if mouseposition is smaller move up, i make example

  • you will need position mouse related to player and then use the" simulate 8direction" action

  • i have this, problem is, the character may only move at one position at a time otherwise it messes up the characteranimation, see i have the x positions disabled

    link

  • hmm... well this is turning out more complicated then I had expected... its like 4 a.m. so Im going to take a break for a little bit, maybe when I get back I'll have some new idea... or some one else has something. Thanks for all the help on this, let me know if you figure it out. :)

  • Bump.... Any Ideas yet?

  • I'll try to help ya tomorrow cause i can't open construct in the library

    (pc's are too slow!!)

  • diabloLikeMov.capx

    have fun

  • Whoa cool.. you didn't have to do it for me but thanks a lot.. exactly what I was looking for !! <img src="smileys/smiley32.gif" border="0" align="middle" />

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)