InDWrekt's Forum Posts

  • I'd really like to play with your setup to get a real good idea of what would work best.

    In many games that use a gamepad, the settings allow the user to choose from a preset selection of layouts for the joysticks. For example, you could chose to set the right joystick to regular (point up to look up) or inverted (point up to look down) but you couldn't choose to make the right joystick do what the buttons on the right do. The users aren't usually allowed to change them beyond these presets. I think doing it this way will be the easiest for you. For the buttons you can easily give them access to, let the player customize them. For the gamepad and joysticks, have a couple preset options and let the player select which preset they like best.

    Not only will this be the easiest customization for you to implement, but for the most part, players are already used to having gamepad options work this way.

    Hope my suggestion helps and good luck with your project.

  • Just have to say, this is a really enjoyable game. It is quite difficult as well. Thanks for posting it. I had a lot of fun playing.

  • Without a little information on how you setup your project, we won't be able to help you. What settings are you using? I see you can't post a link, but can you at least tell us the name of the tutorial series you used? Unfortunately, without some idea of what you have done, those of us who would like to help you out, don't even know where to start.

  • Have you taken the time to do any of the tutorials? There are no tutorials I know of on the site for your specific game type, but there are a lot of tutorials that will teach how to use the program. Before attempting to make any type of game, you should take the time to learn the mechanics of Construct and study a little bit of game design. Most people who try to dive straight into making any one particular type of game without first learning the basics will wind up frustrated and will never complete any project. That is until taking a step back to learn.

    Start Here:

    https://www.scirra.com/tutorials/37/beg ... onstruct-2

    how-do-i-frequently-asked-questions_t63692

    Before attempting this type of game, you will need to learn:

    1- how to make an object follow a path

    2 - how to rotate an item using mouse input for aiming

    3 - how to check and handle collisions

    4 - how to trigger events (for example, when the ball train gets to the end of the path, you need to trigger a game over event)

    5 - how to insert a new object into a chain of objects (ie when a ball hits the train, it needs to be added where it hits)

    6 - how to check for the correct number of same type objects connected (3 red balls in a row)

    7 - how to keep score so you can tell when the player has won

    <optional>

    8 - how to create and run animations (you don't technically need sprite animations for this type of game but it makes it look a lot better.

    9 - how to add bonus items

    10 - how to add sounds (music and/or sound effects)

    You can find tutorials that go over many (but not all) of the items listed above by searching the tutorials section on this site. You can also find many good examples built into Construct in the templates.

    If you take the time to look learn each of the above (either from examples, tutorials or trial and error) and don't try to skip the learning step, you may just be successful with your project. Just remember, Construct is a tool and if you don't take the time to learn the tool, it doesn't matter how good your idea is.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I am a total beginner and i got interested by the thing nimos100 has offered instead of tutorial.

    Can you guys check if my code is alright?

    I did it, but is there a better way to the same thing?

    my file

    You should take this to it's own thread.

  • I think the issue is more about how you are understanding the search in the event sheet to work. As far as I understand it, the search doesn't just take you to the first instance of the search string.

    If you do a search and look at the event sheet, all events that do not have the string you searched for are hidden. This means every event you see has an instance of the search string in it somewhere.

  • Glad I could help.

    Just wanted to say, I only used the numbers above for readability. In all cases, you can replace 100 with pMaxHP, 20 with potionAmount and 80 with (pMaxHP - potionAmount). So, the first option could read:

    ...The first triggers if the health value is below or equal to (pMaxHP - potionAmount) and simply adds the potion and health values. The other triggers if the health value is above (pMaxHP - potionAmount) and simply sets health to pMaxHP.

    As I mentioned in my first post, the last option is more compact but requires an understanding of the min function and for those who don't know how it works, it may make it more difficult to upkeep. However, for those users reading this post who would like to understand the third option min(<health> + <potionAmount>, 100), here is a breakdown of what is going on:

    min() -> This is a function built into Construct that takes a list of numbers separated by a comma and returns the lowest lumber in the list. There is also a function called max() which takes a comma separated list as well but returns the highest number in the list.

    Inside the parens, I have 3 values:

    <health> -> the current player health value

    <potionAmount> -> the value to be added to health when a player drinks a potion

    100 (aka <pMaxHp>) -> This is the max health value the potion is allowed to raise the players health to.

    The first 2 variables are added together in the function. The min then evaluates to see if <health> + <potionAmount> is lower than 100. If it is lower, the sum <health> + <potionAmount> is returned. If not, 100 is returned.

  • One of the easiest ways to do this is, have 2 separate sub events. The first triggers if the health value is below 81 and simply adds the potion and health values. The other triggers if the health value is above 80 and simply sets health to 100.

    Another way to do it is, add the 2 values together as you are doing right now and, immediately after, have another event that checks if the health value is above 100. If it is, set it to 100.

    finally, for a more compact, but less readable version, you could use the following:

    min(<health> + <potionAmount>, 100)

    Of course you need to replace the angle brackets items with the values you are using for the 2 items. This equation returns the lower of either the health plus the potionAmount or 100.

    The real question for you is how many events you want to use and if you will be able to look at the event later down the road and remember what it is doing.

    Hope one of these options works for you.

  • Instead of adding another variable, you can just check the MoveXY variables to see if they are = to 0 in event 3. I have added that to the attached version.

    I am guessing it is events 4 and 7 that are the ones you are having trouble with. Simply put, these 2 events find which direction the player is dragging. This set of events makes sure the sprite only travels vertically or horizontally, not both.

    The abs function returns the absolute value so if the amount from the subtraction is negative, abs returns the positive equivalent (in other words abs(-5)=5 and abs(5)=5).

    Event 4 triggers when the distance between Touch.X and Sprite.X is greater or equal to the distance between Touch.Y and Sprite.Y.

    Event 7 triggers when the Y distance is greater (basically any time event 4 doesn't trigger).

    <Edit> I just realized, I was setting 2 variables, InitialX and InitialY, but never using them. These 2 variables were meant to make sure the player touched the sprite before allowing movement to happen. That is why you could touch anywhere and the sprite would move. Sorry about that. It is fixed.

  • Here is an updated file with the motion type.

  • Ok, well then we'll do it here.

    First: Your setup has movement happening after the player lets go. I didn't understand this from your first message. Is this the desired effect?

    Second: As it is set up, when you click, the movement is set to 0 (first event on touch sets movement to 0) and then reset in the new direction when you let go. You said you wanted the movement to only work if the sprite isn't moving.

    Finally: When you say "a variable to see if the player has contact with the sprite first..." it sounds like you want a slingshot type effect. Click and drag off of the sprite to create force. Then when the player lets go the object flies off in that direction. Is this correct?

    I have some time today, so if you get back to me quickly, I can update my example to be more what you are looking for.

  • Just sent you a pm

  • A quick google search of "free 8 bit tile sets" came up with this:

    http://www.pixelprospector.com/the-big- ... -graphics/

    I haven't used the site before but it appears to be a list of other sites containing graphics for free use. I looked at a few of the links and they have some pretty cool images and the graphics are all supposed to be royalty free.

  • Now that is a big question. If you have never built an enemy ai system before, this may turn out to be a bigger project than you are ready for. However, here is a very low level breakdown of the main ai mechanics of the basic beat'em up style enemies:

    * Enemies try to get lined up with the player on the same y axis to attack the player

    * Melee enemies try to get within x axis range while staying either above or below the player before matching the players y axis

    * Single melee enemies will try to circle around behind the player to attack from the back

    * Groups will try to surround the player

    * Ranged enemies try to stay at a distance along the x axis but stay lined up with the players y so they have a direct shot

    These 4 things are the major mechanics of the basic enemies in almost all beat'em up style games. While it doesn't include bosses or more difficult enemies, it is at least a start point. Of course, as I said, it is an extremely low level explanation and does not in any way describe how to pull it off in Construct. I want to stress again, that it would be a much easier task if you have experience with enemy ai systems. This shouldn't be the first type of ai you create.

  • From your post, it seems to me like you are doing it correctly. When the button is pushed, the event should fire the setFocus action of the textBox you want the cursor in. A possible reason it is not working is, there may be an event later in your event sheet which is getting fired and giving focus to another object. You could test this by making one of the events in question the very last event in the event sheet. Then, if the button works to set the focus when you run it, you will know this is the issue.

    Other than that, I would have to look at your setup to get a better idea of what is going on. If you don't mind posting the capx file, I can take a look at it and see if I can see anything for you. Or you can PM me if you don't want the file public.