InDWrekt's Recent Forum Activity

  • You will have to figure out your value calculations...

    As stated in my original post, you will have to "figure out your calculations".

    In my example, I did this to define the value of the sliders:

    int(Self.X - (BarBackground.X - (BarBackground.Width / 2)) - (SliderEndLeft.Width / 2))

    You really don't need this, all you need to know is the current distance your 2 sliders can be away from each other and divide it from the maximum distance they can be. This will give the percent distance which can be used to calculate your values.

  • Thanks, it's working fine. but i don't understand about math in this matter, but its ok i will learn it.

    Not sure what you mean here. The math is done for you. As I stated before, all you need is the radius. Your curve is a portion of a circle. You need to figure out what the radius of the full circle would be and set that value as the Radius variable value.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you haven't done it yet, add the Touch object. Add a Touch event when touching object and select the onscreen control you defined for moving right. Create an action for your players platform behavior simulate control - pressing right. Do the same thing for your right control and jump control.

    The events are: Touch > Is Touching Object

    The actions are: Platform > Simulate Control

  • I threw together a quick example for you. You can easily restrict the x position of the slider by setting the drag and drop behavior to just use the horizontal axis and then defining a maximum distance from the center of the background. To get the slider object to stay on the curved paths Y position though, you need to do some math. You'll need to figure out the radius of the circle path you want to follow. Everything else should be provided.

    Construct 2

    drive.google.com/file/d/1-kb24OJNNeBwANyilb4Egmu2MOgdJzp4/view

    Construct 3

    drive.google.com/file/d/1RYz8XO_3vOnp4fzQUoVHnk5Ojx2aY5oj/view

  • Unfortunately, for this I believe you'll have to implement a custom slider bar. Here is an example I threw together for you. You will have to figure out your value calculations but it should do just about everything else you need it to.

    drive.google.com/file/d/1vroBAYGSuyIpygUt8K1CsExNcAedT7_5/view

  • I don't know of a single command to clear everything but, maybe this information can help you cut down your events.

    Since you are specifically asking about arrays, one thing to remember is, arrays are marked global by default. This means the information in them persists between layouts. If you are trying to reset these values at the beginning of a layout, just uncheck the global parameter for your arrays. If they aren't marked global, they won't persist between layouts and will be reset when starting the next layout.

    If you aren't specifically trying to reset arrays on start of each layout, but are instead just resetting them arbitrarily, you could add them to a family and call the families clear action, instead of clearing each array individually.

    Variables are similar. Like arrays, if you are trying to reset these values on start of layout, don't use a global variable. Local or instance variables all reset on start of layout without having to use an action.

    Of course, if you aren't reseting on start of layout and you NEED to use/reset global variables, the system has a Reset Global Variables action that will reset all global variables to their initial value. This resets ALL global variables though so you need to make sure there are no variables you need to persist.

    For Objects, the system has a Reset Persisted Objects action that will reset all items marked as persisted to their initial values.

    These suggestions can reduce your actions quite a bit.

  • 0 means there is no data in the position of the array you are accessing.

  • This isn't quite accurate. While the documentation implies that is how it works, it actually considers items from the same container placed in the editor as joined together. The order you place then on the editor decides which items are in the same container. For instance, of you place 1 copy of sprite1 and the 1 copy of sprite2, they will be joined together. This is because, on start of layout, those items are created at the same time meaning they are created together. This can be tested by setting your container selection mode to select all. You will see that both items will be selected.

    All items in the container will be associated with other items in the container according to the order you place them in the editor. First sprite1 with first sprite2 and second sprite1 with second sprite2, etc...

  • drive.google.com/file/d/1JdiPBFTmxGz8NWhpiv4hjlG0AcQdejdF/view

    Try this out and see if it works for you. Just click to spawn the ripple effect.

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

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