InDWrekt's Recent Forum Activity

  • 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.

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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

InDWrekt's avatar

InDWrekt

Member since 19 Sep, 2011

Twitter
InDWrekt has 7 followers

Trophy Case

  • 13-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

18/44
How to earn trophies