mutajon's Recent Forum Activity

  • Hi!

    So I have a collection of instances of a sprite, that I want to all walk in a column towards a random point on the screen.

    Any ideas how to achieve that?

    Thanks!

    To clarify:

    They don't actually have to follow each other, it just has to look that way. So, for instance, if it is simpler to have each of them walk the same path, and it will make it look like they're walking in a column - great! (but I still don't know how to achieve that either :-()

  • Perfect!

    Thanks a lot :)

  • Hi!

    So, Say I have 10 sound files named 'soundX.mp4', where X can be any number from 1 to 10.

    How can I have an action/function, into which I pass a number/variable, and it plays the desired sound from the 10 possibilities.

    Thanks! :-)

  • InDWrekt

    It sure does.

    And thank you for taking the time to explain it so clearly :)

  • brushfe

    That did it!

    Thanks!

    Every day I learn something new about this program...

  • Really!?

    local variables constantly reset!? Do you know the logic of why this is so?

    this makes them rather limited and forces me to use global when there isn't really a need for it to be global other than this weird limitation...

  • But why does it reset?

    And how do I prevent it from doing so?

    (and it does not reset when it is global?)

  • So I have a sprite animation's frame set to a local variable, and each click of the mouse is supposed to increase said variable by 1, and thus progress the frame shown by the sprite (comic book bubble updates).

    HOWEVER, this works ONCE and then stops working.

    If I make the variable global, it works as intended...

    Why does it have to be global to work?

    The project

    Thanks for any help!

  • Thank you both so much :)

    I do need the offset, since the grid is a kind of board game, so having it start at the absolute origin (0,0) is not very practical. However, the offset doesn't have to be 'weird', it can be 100, 150 or something like that.

    I'll have a closer look at what you suggested, and report back if I still can't make it to work.

    Thanks again!

  • I'm creating a grid of tiles (the size of the grid and tile can change), and a randomly sized rectangle.

    The rectangle is always some multiplication of the tile size - for example: 3 tiles X 4 tiles etc...

    The rectangle is draggable, and I need it to behave in the following way:

    1. Always stay within the grid boundaries

    2. Move along the grid lines

    - I've sorta managed to do number 1, although there's a very jittery behavior near the edges - if anyone can help with that it would be GREAT!

    - I ripped nearly all my not-so-thick hair trying futilely to get the second behavior to work - no matter what I try, I only manage to get the rectangle to be dragged by tile-sized increments, but it is never aligned with the grid itself... and worse, this misalignment changes as one changes the screen size!

    PLEASE - help me keep what little hair I have left...

    The project file

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • dop2000

    Thanks! and how do I reference elements using scripting?

  • So I'm struggling a bit with how to make versatile functions by passing them different information types.

    For example, consider the following function:

    updateNumberAndText(x,y,z)

    step 1: add y to global parameter x

    step 2: update text element z to display the value of x

    I know how to pass the y value by using a local numerical variable, but how do I pass which global parameter (x) to change? and how do I then pass which text element (z) to update?

    (Clarification: I want to be able to change x and z every time I call the function from within the game)

    Thanks! :-)

mutajon's avatar

mutajon

Member since 2 Oct, 2020

None one is following mutajon yet!

Trophy Case

  • 4-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

6/44
How to earn trophies