InDWrekt's Recent Forum Activity

  • The Double-jump behavior has an action called "Set Double Jump Allowed." I show it in the example I gave you. I tells the system to allow the player to jump again. It can be used to jump another time after a double jump has happened but before the player lands on the ground.

  • Then you probably don't need the actions that enable and disable the double jump. Play with the example and see if you can get it to work with double jump already enabled.

    Again, this is a solution I found to solve the problem using the tools at hand. There are probably many ways to do it with no right answer. Just viable solutions. If this example doesn't work for you, I'm sorry.

    Good luck with your project.

  • Glad to help and good luck with your project.

  • I've been watching this question for the past 6 days to see if there was a good answer already out there that someone would point out. Since no one has chimed in yet and I couldn't find an answer doing a quick search, I decided to play with it myself. Here is a very simple sample project using the platform behaviors double jump action. It works really well and only uses a single event with 5 actions. The actions enable the double jump and set it available to use so it can be repeated. It then disables the double jump after .25 of a second so the player has that long to hit jump again to get the effect.

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

    It was fun to figure out and not too difficult to implement. I hope it gets you what you need and good luck with your project.

  • I modified the example and made it a little clearer how the sub-objects are accessed. Download it and take a look.

    drive.google.com/file/d/1po9DyAyt7RhQ4upD-_h6JNZYdHLCfmas/view

  • In your image, your preconditions are declared as Objects, not as Arrays. You would access them the same way you access the choplog object.

    Did you look at the example I uploaded? It shows the use of the path. Basically, using the example you showed, I looped through the actions. In the loop, I use JSon.Path to reference which object the loop is currently looking at. To get the sub objects of the choplog object, loop trough the entries of choplog and use JSon.Path. The path to the preconditions would be Actions.choplog.preconditions.

  • From your original question, I thought you meant you just wanted to replace a single image with another one. This new question looks more like you want to be able to swap images on the fly in game.

    You should look into Spriters Character Maps feature. Using this, you can define a single animation but using the character map, change any image of the animation. You would have both your sword and dagger items in the single Spriter project and can swap between them using the character map.

  • I have checked on this question a couple times over the past couple days. I would love to be able to help you solve this but unfortunately, without access to your project, I don't think you'll be getting an answer. Can you post your project so I can take a look at what is going on and try to help you solve it?

  • I use Spriter with Construct quite a bit. If the image you are adding is exactly the same size and the key points in the image are in the same location, you could be fine swapping it in the construct files. Given the state of the Spriter plugin, it would be easier to do it this way. You will have to find ALL the different places the image you are replacing is in the construct file and make sure the new file is named the correctly but it can work.

    If the new image is not exactly the same size with all key points in the same positions, you definitely want to do it in Spriter.

    If you are running the beta version of Construct and have the version of the plugin that is built for the beta, I would say you would be better of doing the change in Spriter. The beta version of the plugin is MUCH easier to load edited versions of the project.

  • Francesco2020 It appears you don't have a Construct 3 paid license. dop2000 suggestion is the best way to do what you are trying to do but is unfortunately a premium feature. The Free version can't use families. To get what you want without families, the easiest thing to do is, make all your sprites for the menu into different animations in a single sprite. Then you only have 1 object to worry about. Then, name the animation the same thing as the building sprite is named and use the system create object by name method passing in the animation name. It is slightly less simple then using a family but still works just as well.

  • Try using the JSON.Path reference in your loops. That should get you the key at the current loop location. It also makes the code more generic meaning it can handle more things than just chopLog. See the picture below. In the events, you can see I do a compare on the value type to see if it is an object. This is where the system would get your preconditions and events.

    Here is the example I built to figure it out.

    drive.google.com/file/d/1po9DyAyt7RhQ4upD-_h6JNZYdHLCfmas/view

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • drive.google.com/file/d/1NxkWaP-P3R8DDSKWOT147vJXFNmfMV2Y/view

    This is a small but surprisingly advanced example. It uses the Date plugin to get and format date information and compares the timestamps of the items to see if the due date is passed. I didn't add in time so you will have to figure that out but it is just the same as what is done. In the example, I store the date string. You could instead store the timestamp which would make it harder to find and edit manually but again, I'll leave that up to you to work out.

    Good luck with your project.

InDWrekt's avatar

InDWrekt

Member since 19 Sep, 2011

Twitter
InDWrekt has 7 followers

Trophy Case

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

19/44
How to earn trophies