Biscotto's Forum Posts

  • From what I can see, you're not making the pick of a given object instance to assign it the color. Basically in the for loop of each assignment you assign the same color to all blocks each time.

    The last color in your JSON is white, so at the end of the loop you will have all your blocks white.

    If you add a brakepoint to your loop, and in debug mode, proceed tick by tick manually, you'll see what happens during the loop.

    I recommend creating the block and assigning it the color in the same event, or else make the correct block pick when you assign it the color.

  • I don't think it's necessary to create a dedicated group. You could do it this way:

    - Create a function that spawn your enemies.

    - Inside the function you insert several ifs divided according to the score range you want. For example: If points is >= 0 and < 100 then spaw enemy A, if points is >= 100 and < 200 then spaw enemy type between enemy A and enemy B etc.

    By doing this, by calling the spawn function of the enemies once, you can create enemies automatically based on the current score.

  • Can you show the rest of the code as well? I mean the part that cycles the entire grid to insert the respective values from the JSON file?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Are you sure about how that feature works?

    In a control event you check if "Time = Function.Param(0)". This, if I understand your message correctly, doesn't make much sense....

    Could you post the entire Param function (maybe even add comments) to better understand how it works?

    Edit:

    Question:

    Based on the number of players. do teams have to be created proproportionally? Example: If there are 10 players, should 2 teams of 5 players each be created? Or must there always be 8 teams?

  • The first solution that comes to my mind, is to add a control on the current animation of the object, before assigning it a new animation.

    Example: If you move to the right, and the "right" animation is already present then don't set the "right" animation again.

  • That's right. You can still use any other event to compare two values, such as "Compare two values" in System.

    Glad I was helpful. Happy programming! ^^

  • This is a simple example to help you understand what I wrote. Theoretically, if the ship moves only during the "Is in touch" event, you can move the control there, instead of in the "Every tick" event.

    I noticed that you use the "Move To" behavior to make the ship move. In your first post you were only asking about the tilt based on the X axis, but in your case, the ship also moves on the Y axis and also changes angle. So you have to adapt the various controls according to your situation (surely you have to insert a control on the Y axis just like you are doing on the X axis).

  • I think the associated option is "Pixel Rounding" which is located in the DISPLAY category in your project settings (click on your project name to view the settings).

    I also recommend setting the "Sampling" option to "Nearest" if you use pixel art graphics, or to one of the other two depending on the type of graphics in your game.

  • I did a test, and indeed it seems that the coordinates of the second touch are not found, and as a result the new object is created at coordinates [0, 0].

    Try to save the value of "Touch.XForID(1)" and check if it returns a correct value.

    Edit:

    Oh, I noticed you edited your previous post. So I take it that you were able to solve your problem. Great! ^^

  • I can't answer your question precisely, but checking the manual, it doesn't seem to be possible to directly change the character spacing for an imported web font in Construct 3.

    One solution, however, would be to create a Sprite Font using the font you want. Then you have full control over all the font settings, and you can change the space between characters as well.

  • I'm sorry, maybe I'm not very clear on your question, but if you have already set the movement commands, why don't you tilt your spaceship according to the input you receive? Input to the right = tilt to the right etc.

    For your last question, the answer is yes. Every tick you should check the position in the X-axis of the spaceship in the previous tick (which you saved inside a variable). If newPosX > oldPosX then the ship is moving to the right, if newPosX < oldPosX then the ship is moving to the left, if newPosX = oldPosX then the ship is stationary.

    I repeat that however you could simply tilt the ship according to the movement input received (keyboard, controller or touch), without making every tick a check on its position in the X-axis.

  • Did you write the code for the screen you sent? If yes, what does the "Param" function do?

    I also understand that you want to take all the "Jogadors" in the layout, and divide them into teams of up to 5 players each. Right?

  • I never changed the default language from the settings, so I couldn't test the problem you described.

    In the little yellow box at the top left, you can change the search to English with a simple click. Even there, however, there is a small error as it is shown erroneously a "bookmark" that I think should be replaced by the system by a word (maybe the word "Tutorials").

    Edit: I think a fast fix is to incrase the padding-top value for .newFooterOuter css selector.

  • I would like to report an annoying CSS-level error on the turorials page of your site.

    As you can see in the screen I have attached, if no tutorial is shown in the list, the search field located at the bottom of the page, is partly covered by the footer container.

    I recommend increasing the margin between the two elements so that the search field is easily viewable and usable.

    (Screen made using desktop browser Firefox version 96.0.1 (64 bit))

  • Hi everyone,

    I am trying to recreate a grappling hook to use in my game.

    However, I'm having trouble creating a rope that connects from point A to point B and "shrinks" until it takes the player to the new location.

    I tried to follow the official example called "Hook shot" present on Construt 3 (so I managed it by creating a Tile Sprite, and modifying its Width depending on the distance the rope has to reach).

    Following the example everything works perfectly, but I have a problem with coordinates.

    I'll leave you a quick sketch I made to better show you my current situation:

    Basically I can perfectly create my own rope, and make it reach its destination by changing its Width.

    The problem is that when I go to decrease its Width to 0 (so making the player reach the hooked point), the rope moves to the right or left. probably this is due to the fact that changing the Width of the sprite, the image changes position.

    Does anyone know how I can solve this problem? I would like to make it so that once hooked the point to be reached, the rope shrinks until it has a length equal to 0, but maintaining its coordinates that were used to connect the point A and B of the hook. In my current situation, the hook is executed correctly, but the player is dragged to a position that is not precisely where the hook hit.