InDWrekt's Forum Posts

  • I can see you are new here so I am going to give you some friendly advice:

    First, read this forum post:

    construct.net/en/forum/construct-3/how-do-i-8/c3how-faq-frequently-asked-126196

    The suggestions in that post will help you get better answers to your questions.

    Second, it is not our responsibility to build your game for you. You need to learn the tool and figure some things out yourself. Go check out the tutorials. There probably isn't one about your specific game type but if you follow them and build the games they show, you will have an understanding of how the engine works. You can also check out all the sample projects that ship with Construct. You can answer a lot of your own questions with them. Then, if there is a specific problem that you are having that doesn't have an easy solution, ask it here.

    Finally, don't start in Construct. Start with a pen and paper. Write down how your game should function. Break it into easy to figure out pieces. Get it all written on paper and then (and only then) are you ready to open Construct and start working. Using your question above, here is an example of how to do this:

    Tug of war Gameplay:

    • 2 teams (possibly 1 player vs AI and 2 player)
    • Each team needs to have a pull strength.
    • For player strength could be a button click speed.
    • For AI strength is a static value depending on difficulty. Could incorporate a little randomness to allow AI strength to fluctuate more naturally
    • Scene will show a rope with a flag on either side of the play areas center point.
    • The rope moves left or right depending on the difference of the 2 teams pull strength.
    • When a flag crosses the center point, the team opposite the flag wins.
    • etc...

    This design document is extremely simplified. It could use some pictures and a lot more description but it gives you the idea. Notice how I describe how the pull strength will work. The more you can describe gameplay elements like that, the easier it will be to build.

  • Please don't post duplicate questions in the forum.

    If you really want to get help with a specific issue happening in your project, the best way to do so is, post a copy of your project for us to look at. Pictures of your code only give a piece of the puzzle. We need to see object paramters, the way your sprites are drawn (yes, this is important), behaviors you are using and how they are set up, etc. Without all of this, it is highly unlikely we can solve your problem.

    If you are one of those people that is concerned that someone here is going to steal your stuff, then create a duplicate of your project with just the code you are having problems with and basic sprites. Sometimes just creating this stripped down version can help you find your own mistake and fix it.

    Also, you're running a windows machine, why are you taking pictures of the screen instead of using windows built in screen capture tools. You can get a much more legible image with them. Just open the windows menu and search "snip and sketch". Trust me. Your screenshots will thank you.

  • KeiMil20, you will get a better answer if you post your project for us to look at. The video shows what is happeneing but without seeing how things are set up, we are just guessing.

  • You should look into timelines to script movement. As for spawning, you just spawn the way you would normally. After spawning the object, assign the timeline to it and it will follow the path you scripted. When the timeline ends, you then move the sprite to its place in line.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Just use the System Create Object by Name action passing in the name of the object you want to create.

    Redownload the project and take a look.

  • This might be a little simplistic for what you are looking for but, you could just record the Uid of the field you are trying to plant when you click on it. Then you don't need to pass the x, y values. You can just use the pick by uid event. Check out this example. Hopefully it will give you a starting place.

    drive.google.com/file/d/1x-pSSSw9a3n-0XJOdTIMZDaZzoeXRPmk/view

  • Just use the % (modulo) operator. It returns the remainder of a division. For example:

    28 % 24 = 4

    In the case of the example I gave you, The last line sets the DaysTillBDay equal to:

    Date.ToTotalHours(abs(Date.Difference(Date.Parse(Date.ToDateString(Date.Now)), Date.Parse(right(NextBirthDay.Text, 11))))) / 24

    For the remaining hours, you would just set it equal to:

    Date.ToTotalHours(abs(Date.Difference(Date.Parse(Date.ToDateString(Date.Now)), Date.Parse(right(NextBirthDay.Text, 11))))) % 24

    Even if you didn't know about the % operator though, you could just do this:

    totalHours - (DaysTillBDay * 24)

  • have a system compare 2 values events checking to see if Enemy.Count = 0. If it does, trigger the go to layout event.

  • There are lots of solutions to this problem. Here are a couple:

    1. Add an animation with the hit color and swap between it and the default animation.
    2. Change the sprites color parameter for a few ticks and the set it back to default
    3. Overlay the sprite with an invisible sprite with the desired color and a blend mode of add. Set it visible for a few ticks and then invisible again when it is hit.
  • Construct comes with built in examples. Check out the intermediate example called level select.

  • Also, I just want to say, if you are allowing user input, it is better to force the user to only input valid information instead of fixing their input after. In this case, where the user types in a value, if you only want numbers, use a number input field instead of a text input field. Then, you have less to be concerned about. In Construct, there is a type property in the text input object.

  • At this point, it's on you to learn the tool. The warning you are getting says, the pattern can match on an empty string. That means everything you can enter into it will theoretically match. It's poor design on my part but, it's not my project. I was just trying to get you something you can use quickly. Learn the tool. try to fix the warning. It will be better for you if you take the time to solve it. You will have a better understanding in the end.

    Good luck with your project.

  • I'm going to revise my previous post and say, you will want the global flag. When I wrote that, I was just thinking about leading 0s which will always come out as a single result. With the possibilty of non numeric characters throughout the string, You'll want the global flag to ensure you get all results. Also, I built you a more appropriate pattern.

    ((^[0\D]+)|(\D))

    The previous one would miss some leading 0s if a non-numberic character was in them (i.e. - 00g00100 would turn into 00100). Good luck with your project.

    Edit: changed the pattern to include an or.

  • (\D)*(^0+)*

    Try this pattern. The parens separate the 2 parts of the pattern and the * says search for 0 or more.

    You really shouldn't need any flags for this search.

    Remember, you can go to regexr.com to build and test regex patterns.

  • Thumbs up and well done. Looks and works great. I would give it 25 thumbs up but the forum only let's me give 1.