rbailey83's Forum Posts

  • Could you share your capx?

    Because I tested the code I posted above and it works.

    it's got some commercial behaviors/plugins

  • You should decrease it if you want to shorten the jump.

    Player is jumping

    or

    Player is falling -> Set vector X to clamp(self.Platform.VectorX, -20, 20)

    Still doesn't make any difference on the distance the player travels horizontally, have played around with the numbers going both ways.

  • Have you tried changing Vector X?

    Something like this:

    Player is jumping -> Set vector X to clamp(self.Platform.VectorX, -100, 100)

    just gave that a try but didn't change anything, even increased it to -200, 100

  • Using the platform behavior and right now the player jumps quite a far distance horizontally, vertical is good when holding down the right or left arrow key. I have played around with the numbers for all the settings and none of it seems to make a difference when making the jump. If holding down the right arrow or left arrow and then the player jumps they move about 256 pixels, how do I shorten that?

  • "make a grid with the size I am using for each tile and align each tile into that grid" is pretty much all there is to it.

    Also make sure your tiles are seamless to begin with, and that they dont "bleed" into each other.

    A picture of your tilemap would help diagnose any other issues.

    awesome, thank you. If I have any more problems i'll post a pic

  • I have tried the method described in a tutorial using shoebox to make the spritesheet for the tilemap, which has worked great so far, but the new separate tiles I have that I want to use to make a tilemap don't seem to fit together properly in the generated tilemap spritesheet. How would I go about making my own spritesheet for the tilemap in photoshop? Do I just make a grid with the size I am using for each tile and align each tile into that grid or is it more complicated than that?

  • Your capx requires several third-party addons, one of which is commercial.

    If I understand correctly, you added a second character object and it's causing all kind of problems.

    I think it would be much easier to have just one character object with multiple animations.

    Your animations can be like this:

    AssassinIdle

    AssassinRun

    AssassinAttack

    GnomeIdle

    GnomeRun

    GnomeAttack

    Also, add an instance variable "characterType".

    As a result, you should be able to add new characters to your game with very minimal changes to your events.

    For example:

    On Space key pressed -> Character set animation to self.characterType & "Attack"

    Ok thanks I will try that out. I may have to just rebuild the first level layout, since the capx can't be viewed. For whatever reason it's as if its putting the player about 500 pixels to the right of where it actually is and the sprite isn't even on the screen anymore, really weird

  • Alright so I was using 1 player character so far in the game, and wanted to start setting things up to allow for a character selection. I am using global variables and an object of playerstart that would spawn the player character in the level depending on which variable was set to 1. The two global variables are playerAssassin and playerGnome1, currently playerGnome1 is set to 1 and playerAssassin is set to 0

    At first it spawned at the location but the player wouldn't move outside of the starting box even though it wasn't a solid, but the animations would play. I tried both create object and spawn object. So removed the player start box and function call and just put the player back in without calling the function to see which player character was active, and the camera was suddenly not where the player sprite was when i loaded the level, this is for layout level 1_1, can't get this fixed now.

    Tried mimicking the same thing on layout level 1_2 and same thing with player being restricted to the spawn point object but when I played this object it seemed like the player was under an object that shoots out flame some distance away from the player as the health was constantly decreasing even though the player was actually not around anything that would cause damage. When i remove the player box and function and just put the player in level 1_2 it scrolls to player, so level 1_1 is really messed up and no idea why it's doing that. tried closing and re-opening, thinking it was just an editor glitch but same problem.

    not sure if that makes sense lol

    here is the capx:

    https://drive.google.com/open?id=1udeI7rypKsU3amPzP--10Z2LBvwgsIDE

  • rbailey83

    I have posted 3 different ways to do similar thing in this Post, I hope it helps

    https://www.scirra.com/forum/viewtopic.php?f=147&t=191444&p=1121903#p1121903

    thanks for the link, those are also good ways of doing it, i will keep that file saved for future reference.

  • Hey rbailey83,

    its me again. As i said in the other thread, you need to multiply enemy.width e.g. enemy.width*0.3 to reduce the distance.

    If the enemys width is 50 and it is mirrored, the width will be -50. + (-20) it turn out to be -70 and not the wanted -30.

    I have made some other changes.

    Look if you like it and play with the values a little bit.

    https://1drv.ms/u/s!Ap_-qxoGKbDcgRbvPycA-qNowq-H

    oh ok, I was thinking that it was if the enemy was still too close to the player then multiply to push the enemy back a bit, sorry must have read that wrong or was thinking about it in the wrong way. That works out great, thank you for that

  • I have got the enemy to stop and start attacking at a certain distance from the player using overlap at offset enemy.width, and i have an image point on the enemies weapon at the tip on one animation frame for contact to subtract health from the player but i need the enemy to move closer to the player in order for that image point to make contact and i can't seem to figure out how to get the enemy closer.

    I have tried setting the enemy.width - 20 but doesn't seem to bring the enemy closer.

    I do have the collision box not including the sword so that for the move forward it is only when the skeleton itself is overlapping the player and this is just to keep the skeleton from directly overlapping behind the player.

    here is the c3p file, it is zipped to contain the lunarray litetween addon in case you don't have it.

    http://bit.ly/2Bfotvz

    here is a screenshot

  • Hey rbailey83,

    i can not open your file because of the addon. But what i can see from your screenshot, it is not that hard:

    For offset comparison, use the enemys width (*x, if needed), as it automatically becomes negative when it is mirrored.

    So he attacks in both directions. For the movement of the opponent, you simply set another condition,

    which also asks if player and opponent overlap at offset.

    EDIT: If the x-offset is too high, it can happen that the enemy wont attack the player when both have nearly the same x-position

    and dont overlap at offset anymore. Make sure that the gap between offset x/-x is not greater than the players width.

    Awesome works great thank you so much!!

  • Doing a platform game, will include c3p file, I can get the enemy go towards and follow player when within a certain range and get the attack animation to play using the overlap at offset but how do I get the enemy to stop and make the attack? I don't see an option to disable line of sight and the way I have it setup is on line of sight set follow to true so if I try to set follow to false because the player is still in that line of sight it will just turn it back to true. Maybe set the LoS to below the offset do the attack and then reset the LoS to original?

    https://drive.google.com/file/d/1RyzxkMJwlWRvhDg1g4Zon5WCSJ2k0WOg/view?usp=sharing

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's in beta, and it's Win64 only, but a desktop build exists.

    Cool thank you for the link

  • Ahh yeah I have this issue, and always assumed its simply due to it being in Chrome.

    Bit annoying, but maybe it doesn't happen in the desktop version of C3 ... if it's really driving you mad.

    have they released a desktop version yet? Haven't seen an option for it, but did see they were going to release a desktop version like C2 shortly after beta