InDWrekt's Recent Forum Activity

  • I save it on my google drive using Constructs cloud save option. I then go to my google drive and get/post the link to it. You can also upload it to a dropbox, github or other online hosting account and share the link from there.

  • All you need to do is set the selected item to the last id.

    -> List: Select item List.ItemCount - 1

  • Ok. Sorry I missed that.

    That being said, your code images don't really appear to be making use of the state machine. I may be misunderstanding your code but it looks like you are relying on disabling and enabling code groups instead of changing states. This is extremely difficult to debug because there isn't an easy way to check if code blocks are enabled or not.

    Did you take a look at the example I built? I think you may find the answers you need there.

    To be honest, without access to your project, we are just guessing about what is happening. Can you post your project? You'll probably get better results if you do.

  • You should be using a State Machine to control your enemy states.

    A State Machine is a common programming tool that defines states something can be in. Each state needs an entrance and exit condition. All the code the enemy uses will be defined by the state it is in. Take a look at this example I through together from your question.

    drive.google.com/file/d/1t3nFqiq7syZXKRWGSOE-VrwVknfgDbeV/view

    My enemy will wander randomly until the player gets within 200 pixels. It will then charge the player and return to where it started the charge. It will be unable to charge until after a cooldown. If the player climbs the stairs so they are higher than the enemy, it will enter a flying state. I didn't add the code for attacking in the air but the state is there. After the player returns to the ground, the enemy will return to the ground and start wandering again.

  • You need to add the audio plugin. After you add it, there is an action "Play (By Name)." Pass the array value into this event.

  • As I understand it, the ToLocaleString shows the time in the most common format for the location you are in. If you want to keep using that method, you will have to split the result up and modify the value yourself. You can use the ToLocaleDateString to get the date and join it to the ToLocaleTimeString. You would check if the time is followed by a pm and if it is, add 12 to the hours.

    -> Set text to Date.ToLocaleDateString(Date.Now) & " " & left(int(left (Date.ToLocaleTimeString(Date.Now), 2)) < 12 & right(Date.ToLocaleTimeString(Date.Now), 2) = "PM" ? int(left (Date.ToLocaleTimeString(Date.Now), 2)) + 12 & right(Date.ToLocaleTimeString(Date.Now), 9) : Date.ToLocaleTimeString(Date.Now), 8)

    Another option is just to build the time yourself using the getHours, getMinutes, getSeconds methods.

  • What method are you using to get the time? If you are using the Date plugin, the time is already stored in 24 hour mode and most of the time methods display it that way.

    Date.toString(timestamp) returns the date info followed by HH:MM:SS in 24 hr then time zone

    Date.toTimeString(timestamp) returns HH:MM:SS in 24 hr followed by time zone information

    Date.getHours(timestamp) returns a value between 0 and 23

    If you need to get the timestamp, use Date.get(Y,M,D,h,m,s,milli)

    Read through the documentation to see more uses:

    construct.net/en/make-games/manuals/construct-3/plugin-reference/date

    If you aren't using the date object, we would need to know how you are getting the date and time to be able to help you/

  • I'm not sure really what you are trying to do but maybe this will help.

    First, given the image, your events aren't going to choose a specific text object. You are using the system compare 2 variables event. This will trigger if it finds a value that matches but no object is selected so you don't know which object the system will choose. Most likely it will be all text objects.

    Instead, you should use a text event and compare it's variable. This is what your events would change to:

    Also, you can cut down your events simply by using the instance variable as the array index.

  • 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/1njkOW5E93Z6dAKfrj2u2FB2pDBqoCkmo/view

    Take a look at this example I built for another date question.

  • Without looking at your projects, we can't really tell you how to fix your issues. However, here are a couple things that are good practices that may at least get you a little closer:

    Platform - Check the animation origin point and make sure it is the same distance from the bottom collision boundary.

    Explanation - Your characters sprite will swap between a falling and standing animation repeatedly if the distance between the bottom of the sprite and it's origin are different on the 2 animations. I prefer to set my origin on platform characters at the base of the sprite and make sure the bottom of the sprites collision polygon is the bottom of the sprite.

    Top Down 1 - Don't use the move to behavior.

    Explanation - I wouldn't think this is what you are doing but I wanted to cover all the bases. Move to doesn't care about solid objects. It just moves to the given destination.

    Top Down 2 - Make sure your tile size matches the pathfinding grid size.

    Explanation - I can only assume in this situation that you are using something like the pathfinding behavior. This happens a lot using pathfinding for users who don't take the time to learn how the path algorithm works. If I'm wrong, you would have to post your project to be able to get help with this one. With the pathfinding, the system uses a grid to define impassible areas. The the size of the grid is stored in one of the pathfinding properties. If your tile size is 32 but your pathfinding grid is 20, the system may not calculate the path correctly. Your tilemap needs to have the same tile size as the grid size of the pathfinding behavior and it needs to have it's origin aligned with it as well (meaning the tilemap origin needs to be on a grid point with 0, 0 being the best origin). Take a look at this to get familiar with how the pathfinding grid works:

    construct.net/en/construct-2/manuals/construct-2/behavior-reference/pathfinding

    Again, to get help with a specific problem, it is best to post your project so others can see exactly what is going on. Without it, you may never get the answer you need.

  • If you're just using a png, all you have to do is open the image in the image editor of the built in tilemap object. The message you are getting comes from trying to open the file from the Tilemap bar.

    Find the tilemap in the Projects panel under the Objects section and double click it. This will pull up the image editor (just like editing a sprite). From there, open your image.

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