winkr7's Recent Forum Activity

  • Do you have pixel rounding set (its a project box)? That might be it. Try turning it on and off and see.

    yours

    winkr7

  • This is good news. I will give it a try next time my internet is down. I have had a hard time with this in the past.

  • You can put your global variables in a dictionary. This may make things harder to debug but at least you know where they all are. You can also put them as static inside functions which are always global.

  • we are judging this AI as experts (Well two of you are experts anyway). Look at what the AI figured out:

    construct 3 is a programming language and not a machine like a crane

    A sprite has a location

    stretch between means to start at one place and end at another

    you have to get the sprite from the UID to get the x coord

    etc.

    It did a pretty good job, just not good enough for someone who knows construct 3.

    yours

    winkr7

  • Hello all.

    I asked the openAI this question:

    How do I stretch a sprite between two other sprites in construct 3?

    it said:

    To stretch a sprite between two other sprites in Construct 3, you can use the "Pin" behavior. The "Pin" behavior allows you to anchor a sprite to another sprite or point, and stretch it as needed.

    Here's an example of how you can use the "Pin" behavior to stretch a sprite between two other sprites:

    In the layout editor, create three sprites: a "start" sprite, an "end" sprite, and a "stretch" sprite. The "start" and "end" sprites will be used to define the start and end points for the stretch, and the "stretch" sprite will be the sprite that stretches between them.

    Select the "stretch" sprite, and then click the "Behaviors" tab in the Properties panel.

    Click the "+" button to add a new behavior, and then select the "Pin" behavior from the list.

    In the "Pin" behavior, set the "Pinned Object" field to the "start" sprite. This will anchor the "stretch" sprite to the "start" sprite.

    Set the "Pin X" and "Pin Y" fields to the appropriate values to define the position of the "stretch" sprite relative to the "start" sprite. For example, you could set "Pin X" to 0 and "Pin Y" to 0 to anchor the top-left corner of the "stretch" sprite to the top-left corner of the "start" sprite.

    Set the "Pin Angle" field to the angle that you want the "stretch" sprite to be rotated relative to the "start" sprite.

    Set the "Pin Scale" field to the scale that you want the "stretch" sprite to be stretched or scaled by.

    In the "Pin" behavior, set the "Pin Length" field to the distance between the "start" and "end" sprites. This will stretch the "stretch" sprite to the desired length.

    Finally, set the "Pin Object 2" field to the "end" sprite. This will anchor the other end of the "stretch" sprite to the "end" sprite.

    That's it! Now, when you run your game, the "stretch" sprite will be stretched between the "start" and "end" sprites, anchored at both ends and stretched or scaled as needed. You can adjust the position, angle, and scale of the "stretch" sprite using the "Pin" behavior's properties.

    END open AI

    So I tried this question:

    write a function with UID of a sprite as a parameters to move a sprite left 30 pixels (unless this movement would create a sprite overlap with any other sprite) in construct 3

    it replied with:

    function moveLeft(spriteUID) {

    // Get the sprite using its UID

    var sprite = GetSprite(spriteUID);

    // Check if there is a sprite overlap

    if (IsOverlapping(sprite)) {

    // If there is a sprite overlap, do not move the sprite

    return;

    }

    // Move the sprite left 30 pixels

    sprite.x -= 30;

    }

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you are using the same sprite on many layouts and it has similar properties you probably want to set the sprite on one unused layout and call it home. If just about every layout uses sprites with properties specific to that layout then you probably don't want to set up a special layout for them.

    The sprite shapes get merged either way so don't be concerned about memory--just do the best organization you can from the programming perspective.

    Just my 2 cents.

    yours

    winkr7

  • As long as it is an option, can we make it so the word "function" can be set so just f or fct if we so desire. Its like begin and end in pascal, the c {} are so much better once you get used to it. I don't want to distract from the op, so just my 2 cents.

  • You can set the padding around the obstacles higher so that sharp edged obstacles are blunted when you move around them. Make the search squares smaller with big padding and you won't get sharp turns around sharp solids.

  • Make a bumper sprite that is as big as you want with a round collision (say 8 points in a circle) and make it invisible (or a see through color while debugging perhaps). Attach each enemy to a separate instance of this bumper sprite as a hierarchy. Make the bumper sprite a solid,

    Every tic turn all bumper sprites solid, have them all push out solid in an ordered manner, turn them off solid. The order matters so you don't get flicker as they push first one way and then another. I think the one that is pushing out can't be solid so all but one get turned solid in the loop.

    This kind of thing works for me.

    yours

    winkr7

  • Don't assume loading time is a problem unless you can measure it.

    The easiest way to associate different text with 20 frames is to write a function that given a number (frame) returns a string (text). Just run through 20 if statements and set the return to the string you want for that frame.

    yours

    winkr7

  • It looks to me like you need to reverse the order of the three text is statements. As it is now you put text 2 in and then test if it is text 2 so it puts text 3 in all at one time.

    yours

    winkr7

  • could you do this based on hexes rather than squares?

winkr7's avatar

winkr7

Early Adopter

Member since 23 Oct, 2014

Twitter
winkr7 has 2 followers

Trophy Case

  • 10-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
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

17/44
How to earn trophies