InDWrekt's Recent Forum Activity

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

  • Thank you for posting your project. calminthenight is correct but here is a little more information. When you set variable1 to 0.06, the system is registering it as 0.060000000000000005.I know that seems strange but is a problem that computers have when storing really small numbers. These 2 values to us are functionally the same but the computer sees it differently. If you change your variables to integers as calminthenight suggests, you won't have this problem. I am unclear why you are using the decimal value in this project in the first place but I would suggest converting to the decimal only where you need it.

  • Try this, in the LAYOUT PROPERTIES window, look for "Unbound Scrolling" and put a check in it. Then run your project. If it does what you want, then your layout is too small vertically for what you are trying to do. For scrollto to scroll to the position you are trying to scroll to, the position needs to be <= the height of the layout - the height of the window. If that doesn't work still, we would need access to your project to find the problem. A screenshot of your events isn't enough information.

    Plus, you can reduce your events/actions for setting the position to a single event.

    + System: Every tick -> System: Set scroll Y to 100000 × Variable1 + 500

    Since you already have an "Every Tick" event, if you put the single scroll action into that event, these 8 events would become 2.

  • You should add all these sprites to a family and give the family the instance variable. Then, you just need to pick all instances of the family.

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