spacedoubt's Recent Forum Activity

  • Just seems strange that it can pick the right one for the cursor..

    All I want to know is "What's the difference?"

  • I have a confusion. I'll explain (see image below).

    allsprites.spritegroup is a variable for the allsprites family and each one is set specifically (for example, I have "Scenery" sprites, "Death" sprites, "Platform" sprites, etc..)

    allsprites.keynum is a variable for the same family, also set specifically (so I can have Scenery 1, Scenery 2, Death 1, Death 2, etc..)

    LastSprite and LastChosen are variables that update when you push a hotkey or roll the mouse wheel.

    My confusion is that, the set cursor action you see here works perfectly. If I push the scenery hotkey, I get scenery if I push the number, it changes accordingly and so on for all the others.

    But if take out the cursor change and try to create the appropriate sprite (the disabled action), it just chooses any sprite at random, completely ignoring my variables. (yes, I know I need to destroy the previous one for it to update properly like the cursor, this is not the issue, though. It's simply ignoring my variables or my picking or both.)

    What's the difference?

  • blackhornet Thanks. I realize that.

    Anyhow, I get it now. I guess I was just having a hard time seeing why they were returning the same values. Gets kinda heavy and multidimensional to think about with both mouse values and both tile values.. Sleep might help.. G'night!

  • okay. I moved my tilemap from 0,0 and got different returning values..

    But if anyone can explain this to me, I've got my head all muddled up trying to figure it out, heh..

  • tilemap.PositionToTileX(mouse.x) & " | " & tilemap.positiontotileY(mouse.y)

    ??

    I set them both to x and both to y to show they're the same. you can set one to x and the other to y and then reverse it. still the same..

    I don't get it?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Is there a way to change the size of your cursor, particularly when it's set to a sprite?

    I'm working on a level editor, and I read somewhere that setting your cursor to a sprite was better for performance than setting the sprite to follow mouse.x,mouse.y. makes sense.

    But I'm scaling to zoom in and out and when I do, the cursor stays the same size, so when i zoom out it seems huge.

    I suspect this can't be done easily, but if someone knows, please let me know!

  • Add the drag & drop behavior.

    EDIT: oh, but you don't want to drag it.. you could toggle a boolean instance variable (state) which tells it whether or not it's dragging.

    like, on click sprite, toggle boolean variable.

    if variable true set sprite position to mouse.x, mouse.y

  • I've noticed PositionToTileX & PositionToTileY seem to return the same value no matter what. Is this a redundancy? Is there any reason for both expressions? Am I missing something?

    I saw this bug report:

    But it seems to have been kind of overlooked since the OP sorta had the usage confused.

    EDIT: Here's a capx

    [attachment=0:5i4evlx5][/attachment:5i4evlx5]

  • I suspect you're falling for the classic floating point numbers trick.

    https://www.scirra.com/blog/141/common- ... nd-gotchas

    Scroll about halfway down to "Expecting math calculations to be exact"

  • That looks great! I've been wanting to do some crazy parallaxing like that. super cool!

  • Awesome! Glad to see this solved. Great solution!

  • That makes sense.

    I ended up with something I like. It's kinda some weird mixture of everything.. but it works, and I understand it, heh..

    Thanks again!

spacedoubt's avatar

spacedoubt

Member since 15 Jul, 2014

Twitter
spacedoubt has 1 followers

Connect with spacedoubt

Trophy Case

  • 10-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

12/44
How to earn trophies