Nimtrix's Forum Posts

  • You have to put the origin image point of the shadow sprite to the top left corner.

  • Here's one way to do it:

    SpawnWithinSprite.capx (r98)

    I set the image point of the sprite to top-left, then made the random expression spawn between the sprite's position and the position + the width/height of the sprite.

  • Variables in construct are declared when you make them, you have to put in an initial value. There's no need to "declare" it by setting it to a value on start of layout, unless you want the variable to reset whenever the layout starts. So as far as I know, he used the wrong term.

  • Hmm, manual says loopindex returns "Current (top-level) loop index". My guess is it returns the Z index for each X you go through, it works fine if you use "Array.CurX" instead of "loopindex".

  • aridale

    Yeah I see the problem, but if you use a single coloured image with opacity set down it looks OK in my opinion. You don't get any border around the selection though.

  • You can save the position you start clicking in two variables, then set the create a sprite and set it's size to the distance between the mouse position an those variables.

    Like this: SelectionBox.capx (r97)

    Edit:

    Better version:

    SelectionBox2.capx (r109)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I only set oldX and oldY once, so in order to constantly check which direction it's moving in, you'll need to update the variables.

    So something like this:

    DragAxisRestrict_Direction.capx (r97)

  • It's not perfect, but maybe this will do? I compare movement in X direction to movement in Y direction, then lock movement to the axis that has seen the most change. Click top/bottom to move vertically, left/right to move horizontally.

    DragAxisRestrict.capx (r97)

  • Picking an instance is a condition because you pick which instance you want to perform actions on. That makes sense, doesn't it?

    Anyway, here's a quick example of picking an object in an array based on UID:

    ArrayPicking.capx (r97)

  • "Sprite(0).X" would pick the sprite with IID 0, R0J0 has stored IID's in a variable called "iid". So "Sprite(iid).X" picks the instance with IID equal to the value stored in the variable "iid".

  • CreatedorMade

    Did you recieve an e-mail? If so, did you put the "c2license.txt" file in the folder where Construct 2 is installed or in "My Documents"? The medal on your avatar indicates you've bought it, so at least the transaction was registered somewhere.

  • Yeah, two conditions in one event means both have to be true to for the actions to run. If you select an event and press "Y", you turn it into an OR-block. If you have two conditions in an OR-block it will run the actions if one of the conditions are true.

  • ludei: Ah, I see. I'll just have to be patient then, this sounds really promising. Thanks for the info!

  • Is this what you are trying to do?

    Quick example:

    Cooldown.capx (r97)

  • ludei

    So if you get the launcher app accepted by apple, that would mean you can test CocoonJS games without a mac and dev account? And if I've understood correctly, you have planned your own cloud for game hosting, would you need a mac/dev to upload there?

    I understand I'll need a dev acc if I want my game on appstore, but I prefer not to buy anything until I know my game runs on the device.