Xore's Forum Posts

  • I have path finding on to allow for the player to avoid obstacles. But when the character was near the target location he would stop, and or sometimes overshoot.

    I added in a set X and Y line to make him center on the square, the problem is it still looks like he teleports. Even more so if pathfinder overshoots. Can someone adjust this and make it more seamless?

    https://www.dropbox.com/s/qnnpyigtwihop ... .capx?dl=0

    Also note I've been looking into adding a custom movement when the player is in a certain range as an option, so far I've not been able to make this work without error. With this idea I was thinking if player is within 30 pixels of target shut off pathfinding, and move towards target until player's location = X and Y.

    Thanks!

  • I've made some progress with the movement, this is "BASICALLY" what I'm looking for. Two problems I'm currently having are in order to make it center to the tile I'm having to set the X and Y location to the tile when it gets close. This makes the character "jump" or "teleport" I'm trying to make it a little more smooth moving.

    Also while the player is moving he seems to make unnecessary wide turns. I'm going to turn this into an actual player character I feel like its more like a boomerang.

    capx:

    https://www.dropbox.com/s/qnnpyigtwihop ... .capx?dl=0

  • Thanks for the response, I'm looking for mouse movement is the problem >.< I'm close to solving what I'm looking for but I could still use any tips to make this long drawn out process come to an end. heh...

    I've made some progress with the movement, this is "BASICALLY" what I'm looking for. Two problems I'm currently having are in order to make it center to the tile I'm having to set the X and Y location to the tile when it gets close. This makes the character "jump" or "teleport" I'm trying to make it a little more smooth moving.

    Also while the player is moving he seems to make unnecessary wide turns. I'm going to turn this into an actual player character I feel like its more like a boomerang.

    The above link is fixed or:

    https://www.dropbox.com/s/qnnpyigtwihop ... .capx?dl=0

  • I'm still looking for any information on this =( I've tried 3 different posts explaining what I'm looking for and still no progress in the right direction. I've even help some people around the forums to make sure I'm giving help where I'm receiving. I'll continue to work the problem on my own but any assistance would be helpful.

    Thanks,

    Xore

  • I have a path finding movement. I'm trying to make it so this movement is centered on the grid tiles. I have the capx of what I've tried so far, what I have disabled did work but it was teleporting from tile to tile I need the movement of path finding but still have it center on the square its walking through and to.

    https://www.dropbox.com/s/qnnpyigtwihop ... .capx?dl=0

    ^^^^

    Updated 7/10/15

  • Hey I'm Adam new to any type of scripting or game making. Taking classes for java but got a little impatient and wanted to play around with some ideas in my head. This jump started me into making my own game and I couldn't be happier, hopefully all goes well with it but if not I'm still having a blast! If only I could find someone to make sprites /heh. Anyways hope to learn from you guys and pass on what I know to keep this community as amazing as it is!

  • Be careful when playing stuff, things like putting destroy sprite before layout could prevent anything from changing as the sprite was destroyed so it didn't finish all of it's commands.

    If you want it to change layout when score hits 1000, be sure to use defensive scripting and do

    When score > 999 instead of when score = 1000, if they have 999 score and get 2 points you never actually hit 1000 so the event doesn't trigger.

  • Option 2 will do what you desire just have to change some conditions around =)

    http://imgur.com/V8JF8Ti

  • Option 1 will load the next layout 4 seconds after you hit the button, but you can't keep hitting it to reset the timer. This doesn't appear to be what you are looking for as you want to add time to a current timer. So give me a min I'll upload some fixes.

    http://imgur.com/Dd2yzg5

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Right now it sounds like you are teleporting to the position. Set position does just that.

    Try to play around with behaviors click the object in question and look for the behavior link scroll down to find movements.

    Once you add one that best fits you can set default movements. Then you can play around with changing speeds and stuff for sprinting and such.

  • Not sure if that resolved your issue but you might want to deal with dt and a variable to solve this. Below is a link. Wait does allow for a delayed event but I'm not sure if you can continue to delay that event by pressing the button again or hitting the object.

    Use this link start at where the bold says every x seconds. It explains exactly what you are talking about.

    https://www.scirra.com/tutorials/450/timers

  • Maybe I can make this a little more simple and figure the stuff out that I know on my own, sorry for the confusion.

    I'm wanting to use pathfinding on a player but center them on a grid. Possibly center them on the squares they walk through as well.

  • Thanks for the post back, now we have a base to go off of, I can try and play around with what you have and may or may not be able to move forward. If I can get it closer without resolve I'll link the Capx file I think I have enough reputation to add files now.

    With this I'm wanting the square to move towards where the mouse button is pressed, and avoid obstacles like walls to get there.

  • I think both ways work honestly. Depending on what he wants. I was taking it as a separate object. So if object 1 has speed and hp of 10 and object 2 has a speed and hp of 20. Destroy and remake a different object.

    But as it is there is usually more than one option. I haven't played around with having a separate image but if you did that when object 1 becomes object 2 you just change the sprite and change the default speed/hp.

    One is more efficient at removing unneeded variables the other is better at saving time, memory, and condensing.

  • Basically what I said :p just more words. Or object 1 hit skill level 5 (variable) spawn object 1 at object 2. On object 2 created destroy object 1.