InDWrekt's Recent Forum Activity

  • In your test, the collisions property of the Sprite object (the one that looks like a wall) is disabled. On the right side of the screen, in the Objects menu, select the Sprite object. On the left side of the screen, the properties menu will show properties of the selected object. Scroll down to the Solid Behavior properties. You will see a property called "Initial State". Set it to enabled and the tank object will not be able to walk through it.

  • You can hide/show this by pressing the f4 button.

  • Can you post your capx file? It would help if we could look at how you have your events set up.

  • What exactly are you trying to accomplish? Do you want to trigger an event when a player clicks an object that is overlapping the background? Do want to trigger the event only when the player clicks where the 2 objects are overlapping (in other words inside the area of overlap)? Do you want to trigger the event when a player clicks where no objects are overlapping? What do you mean by "check for invert overlapping?"

    I tried to decipher what it is you need help with, but could not completely understand. That being said, I am attaching a .capx file that has an example of how to check if an object is clicked, if the clicked object overlaps another object at the click location or if no objects were clicked.

    I hope it helps and good luck with your project.

  • I believe it is a problem with your events. I downloaded the example, ran it and got the result you did. I then removed the event and recreated it with just a mouse click setting the 9 patch to the mouse location. It worked just fine. I then changed it to a Touch event and used the Touch coordinates. Again, it worked just fine.

    You can see this is the case simply by disabling the two conditions for the second event and using a simple On Any Touch Start event.

    See the attached modified .capx.

    I will say, you are using a Touch and a Mouse event to control the same action. This can cause a problem because, when the mouse event triggers, there are no Touch coordinates so the 9 patch would be placed at position 0, 0. Since you are using the Touch coordinates to set the position of the new 9 patch object, this is probably what is causing your event to produce a wrong result. The On Hold Gesture Over event doesn't appear to do anything.

  • You should calculate the Force using the distance and min functions:

    min(distance(Sprite.X, Sprite.Y, Mouse.X, Mouse.Y), 200)

    The above sets the force applied to the sprite by getting the distance between it and the mouse but will not apply a force higher 200. Remember, min always chooses the lowest value of the options passed into it. Play around with the second value until you feel you have a good max value. Also, if the distance doesn't quite feel like it is giving enough force, do a multiple of the distance. For example, you could multiply the distance by 1.5.

    I hope that gets you what you need and good luck with your project.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You could use the Sine behavior on the platform. Start with it disabled. Then, you would have to check the platform on landed event and get the platform the player landed on. When this event triggers, enable the Sine behavior and after 1 period, disable it again. I have attached a simple example that should show you how you could do it.

    I hope this gets you what you need. Good luck with your project.

  • The problem is, the true-type font's displayed on a users computer depend on which fonts are installed. When designing anything for the web, this needs to be taken into consideration. Take a look at this post at W3Schools to see a list of "Web safe" fonts:

    http://www.w3schools.com/cssref/css_websafe_fonts.asp

    To make sure your fonts are not changing when played on different computers, you will need to either:

    1- Choose a true-type font that is 100% compatible and installed by default on all systems your game runs on.

    2- Switch to a bitmap font. Since bitmap fonts are stored with the game and loaded at run-time, they are always guaranteed to display properly on all systems.

  • This question has been covered many times before. Please read this forum topic:

    It should help you solve the issue.

  • You can set the style of TextBox object using it's "Set CSS Style" action. Of course this requires a very basic understanding of CSS. The below screenshot shows how you could remove the border and background of the TextBox object and set the text underlined:

    [attachment=0:pesfa7zd][/attachment:pesfa7zd]

    However, this sets the entire text in the TextBox as underlined. You cannot set the font style for just a portion of it (at least as far as I know).

    I hope that gets you what you need and good luck with your project.

  • There are a couple things you could do.

    1: Add a layer specifically for particle effects. It would have to be above the background layer and below the character layer. Then when you create a particle object, make sure it is created on this layer.

    2: After spawning a particle object, send it behind the character by using the "Move to Object" action. This allows you to set if it is in front or behind the character.

    In my opinion, the first option is the better one. It is more extensible if you set specific layers for different objects. It also makes it easier when testing.

  • At this point, I would have to take a look at your project to know what is going on. I am still willing to help you solve this if you are willing to post the .capx file.

    [Edit]

    You know, I believe I just figured out the problem. Are you deleting the beginning BoxUnit on start of layout? If so, then when the system is trying to reference BoxUnit.Width or BoxUnit.Height, there is no object to reference so the value is 0. After the first BoxUnit is spawned in the wrong position, all the rest can reference it's size to get their positions. For my examples, I have a BoxUnit object in the layout but off the screen. The system is getting the size information from this object so my first visible BoxUnit is set correctly. I opened my project and created this event to test if it would give your results and it did.

    There are 2 ways to fix this:

    1: Don't delete the off-screen BoxUnit.

    2: If you need to delete the off-screen BoxUnit for some reason, create each BoxUnit at an arbitrary location (such as position 0,0) and then use the above calculation to set the position of the newly created object.

    The first option would be the easiest because it only requires removing 1 action. The second, you would have to add a new action positioning the new object. This action would have to happen in the same event as creating the object and would have to happen after the create action.

    I am fairly confident that if you make 1 of the above changes your project will work properly.

    Again, good luck with your project.

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