enum pirate's Recent Forum Activity

  • >

    >

    > I want the player to move without having their angle changed, doesn't the 8dir behavior force that?

    >

    If you don't want the angle changed set 360 smooth to off in the 8 direction settings.

    You can also set it to move in 4 directions or 2 directions.

    It can be used either way.

    Thank you for your help. I ended up using the 8 Direction behavior like you said and took the angle from the player to the mouse to get the X and Y Vectors that I need to get the player moving.

    Vector.X = cos(angle(Player.X,Player.Y,Mouse.X,Mouse.Y)-180)

    Vector.Y = sin(angle(Player.X,Player.Y,Mouse.X,Mouse.Y)-180)

    Works great

  • >

    > > I don't use plugins for something as simple as direction and movement controls.

    > >

    > > The plugin doesn't stop when it should and continues to try and go left and it does not address acceleration properly.

    > >

    > > My suggestion is get rid of the plugin and use the 8 direct commands which adjust for acceleration.

    > >

    >

    > Ok, that makes sense but I would like full 360 movement so should I use the custom movement behavior? Or is there a better one to use for something like this?

    >

    8 directions has a 360 in the settings if you are using a single sprite or you could use the car movement.

    Custom movements are not as well defined by acceleration as 8 direction but can be used.

    I want the player to move without having their angle changed, doesn't the 8dir behavior force that?

  • I don't use plugins for something as simple as direction and movement controls.

    The plugin doesn't stop when it should and continues to try and go left and it does not address acceleration properly.

    My suggestion is get rid of the plugin and use the 8 direct commands which adjust for acceleration.

    Ok, that makes sense but I would like full 360 movement so should I use the custom movement behavior? Or is there a better one to use for something like this?

  • Below is the capx that will demonstrate my problem. It is very simple and only has one line of code but requires the MoveTo Behavior http://c2rexplugins.weebly.com/rex_moveto.html

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

    The problem: I want the player to be able to move to the mouse's coordinates whenever the left mouse button is held down. This works fine but when I have the player move to a solid wall without stopping they will slide really fast against it. For some reason this only happens when the player is moving against a wall on the left or top side.

    If this doesn't make sense you have to try holding the mouse button on the very left side of the screen and when the player comes into contact with the wall they will slide up at great speed. Also, the reason I have the 8direction behavior is simply so the player interacts with solids. I have also tried rex's PushOutSolid behavior but it gives the same result.

    I want the collisions to be like it is in most top down 2d games where the player will slide against the wall at a normal speed and not jitter or go too fast.

  • > I'm going to have to agree with this. Construct 2 is great but exporting to mobile can be a huge pain.

    >

    > Speaking of which, I am planning on making a small Android game again... is the Intel XDK broken at the moment or will it interact fine with C2 to make Android games?

    >

    I don't export to mobile, but I've heard that the cranberry plugins are broken on IntelXDK and some of the official plugins (like iAP and such) only work on some platforms, so yeah, it's a huge mess..

    It's really sad that C3's focus doesn't seem to be about making exporting simple and reliable. I recently got Gamemaker Studio for really cheap and everyone seems to have no problems with exporting to mobile. Guess I'll have to move to that!

  • I'm going to have to agree with this. Construct 2 is great but exporting to mobile can be a huge pain.

    Speaking of which, I am planning on making a small Android game again... is the Intel XDK broken at the moment or will it interact fine with C2 to make Android games?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I am using the photon multiplayer plugin and everything works great except for this one problem I am having:

    When a user enters a room and has chosen the same userid (username) as another user it simply shows up as blank.

    Is there any way to check, upon entering a room, if another user already is using the same name/id so that it can set a new username for the user?

    For example, if someone with the name "Player" entered a room and someone else was already in the room also using the name "Player" I would want to have the entering user's name be Player(1). If there were two other players with the name "Player" already in the room then the third player's name would be Player(2) etc...

  • Thank you nimos100 this is very helpful.

  • Thank you and linkman2004

    I think my main problem was that I was using only one event sheet for my entire game and I would make each system too long without looking at what could make it simpler.

    One specific thing I had trouble with was a crafting system I was trying to make. I used a long string of events just to make it so the player could create one item. Could this be simplified with the dictionary or some sort of table?

  • I see all sorts of tutorials here about how to do specific things for a game (like making inventories and such) but I do not see any on how to make a good framework/engine. Every time I attempt to make a game that is more than 200 events I end up getting pretty lost and everything seems to turn into pointless spaghetti code.

    I realize that this requires practice but I really am unsure what the best way to make a larger than usual game would be.

  • http://i.imgur.com/bWbonsy.png

    My code for the inventory system is shown above. When I put a string into the text box it creates an object in the inventory or adds it to an existing stack. I am wondering how I would make it so that the items that I add to the inventory will be shown in slots and when I select a slot I would like to be able to discard the item.

  • for the map generation I would use a seeded perlin noise generator, in much the way you would use to create an island in 3D but just set it so if the height is greater than x the tile is land, and if it is less then x it is sea. See here. It is important to seed the generation else it wont give you an island, but instead areas of water and land in a cloud-like pattern.

    As for the trees and rocks you could use a loop while x is less than the number of tree areas you want, pick a random position. If that position is empty land, then continue, else break. Then from that position, place x trees by moving random values (within reason) in x and y and placing trees there until you have x trees in the area. The same can be applied to the rocks. As for the interaction, when the player wants to move check that its not into a rock before allowing the move, if it is, prevent the move. If the player is looking at the coordinate of the tile given +- arctan(width-of-tile/distance-from-tile) degrees and is a suitable distance from the tile then a use key should do the required function.

    I see, would I need a plugin to use this method?

enum pirate's avatar

enum pirate

Member since 1 Feb, 2014

None one is following enum pirate yet!

Trophy Case

  • 10-Year Club

Progress

10/44
How to earn trophies