dop2000's Forum Posts

  • You might have a line break in the text (at the beginning or at the end of the string. Line breaks are not shown in debug mode.

    Add trim() expression, it will remove all linebreaks, spaces, tabs etc.

    Set text to trim(tokenat(.....

  • No... That's the same as "transpose" feature in Excel:

    https://chandoo.org/wp/2013/02/01/trans ... l-formula/

    For clockwise rotation try this:

    For x=0 to Array1.Width-1

    ...For y=0 to Array1.Height-1 -> Array2 set at

    ............X:loopindex("y")

    ............Y:((Array1.width-1)-loopindex("x")

    ............value:Array1.At(loopindex("x"), loopindex("y"))

    (This is just off the top of my head, not sure if it's correct)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you move the finger outside the sangPad, dragging will be interrupted, because sangStick can't move further.

    That's why you need a separate invisible sprite that can be dragged freely.

    It's a popular trick, you can see an example here:

  • Rotation should be easy enough:

    Array2 set size to (Array.Height, Array.Width)

    For x=0 to Array.Width-1

    ...For y=0 to Array.Height-1 -> Array2 set at X:loopindex("y"), Y:loopindex("x"), value:Array1.At(loopindex("x"), loopindex("y"))

  • You can't use drag&drop on the same sprite.

    Create another (invisible) sprite with Drag&Drop behavior, say "dragSprite".

    Remove Drag&Drop behavior from the "sangStick".

    Change events to this:

    dragSprite is dragging -> set AreaAngle to angle(sangPad.X, sangPad.Y, dragSprite.X, dragSprite.Y)

    .................set AreaDistance to distance(sangPad.X, sangPad.Y, dragSprite.X, dragSprite.Y)

    The rest is the same.

    When not dragging, return both sangStick and dragSprite to sangPad posision.

  • Here is a much smaller and clearer capx demonstrating this problem:

    https://www.dropbox.com/s/017qy6lc3alz9 ... .capx?dl=0

    Blue sprites are not "pickable" for several seconds after they have been created.

  • What are you talking about?

    Sprites are displayed the way you create them, unless you change their angle on the layout, in events, or use some behaviors that can change their angle (8-direction, bullet etc.)

  • Your image is not loading.

  • Collision checks are only performed if you have any events like "is overlapping" or "on collision" with this object. Or if you are using behaviors that rely on collision detection (solid, bullet etc.)

    Try putting several text objects on the layout and run it in debug mode, you'll see that they are generating 0 collision checks.

  • You are setting instance variable pickedUp on a slime! Each slime has its own pickedUp variable.

    When you pick one, its variable is set to true.

    The next time your character is overlapping another slime which has pickedUp=false, that's why you pick up the second slime.

    You should create a boolean variable on the character (Sprite2).

  • provintia7

    I don't know why in your example it doesn't get picked even after 3 seconds..

    All I know that it's definitely a bug and you should report it.

  • Run your project in debug mode, see what's going on with PickedUp variable.

    Instead of "toggle" try "Set PickedUp to True".

  • Yes. Or you can add it as a second condition to "is overlapping" event.

    Player is overlapping chicken

    variable=false

  • In the "Is overlapping" event create a sub-event "Chicken pick top instance" or "Chicken pick closest instance" and then pin it.

    And of course you need to set some variable or instance variable (ChickenPickedUp=true), so then other overlapping events will be ignored.

  • Here you go:

    https://www.dropbox.com/s/h67nu1sqfome3 ... .capx?dl=0

    You can replace event #2 with this:

    Small->Set position to Big

    Small->Move at angle (angle=a, distance=d)