R0J0hound's Forum Posts

  • Here is the topic that TELLES0808 was talking about. It has a working download.

    http://www.scirra.com/forum/1d-water_topic47386.html

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I suppose it's possible, but only with a plugin. With a google search I found this javascript library that could give a starting point:

    http://code.google.com/p/midibridge-js/

    From what I can tell it uses java as a backend to access the midi devices as javascript prevents any direct access to the computers hardware.

  • One possible implementation:

    <img src="https://dl.dropboxusercontent.com/u/5426011/pics/tripple_tap.png" border="0" />

    After each touch the user has 1/2 a second to add to the cumulative taps. Event 2 is the place to put your actions.

  • Nothing looks amiss to me, and my tests result in correct results for me. Do you set the size of the ExplosionSprite anywhere else in your events?

  • I believe you're mistaken, it wasn't removed, it never was there.

  • Spritefonts are primarily just mono spaced fonts (aka all the same width) although it is cool you can get it working with variable width fonts as well. For the case you cited of using the Arial font why not just use the text object? It's use is basically the same as adding text in photoshop or any other program you mentioned.

  • zenox98

    Yes, and I recommend it's use in my post, but a instance variable is still needed to save what the scale is set to as there is no expression for Sprite.scale builtin.

  • I didn't address point number one but here is a possible solution to number 2:

    /examples19/wall_crawl3.capx

    https://www.dropbox.com/s/dlsu2ouuih9yv ... .capx?dl=1

    Some more tinkering may be needed to perfect it.

  • Hi,

    I don't mean to step on toes but unfortunately Sprite doesn't have a scale expression. So here are the steps to get the effect you want.

    1. Add an instance variable to your sprite, call it "myscale" and give it an initial value of 0.1.

    2. Add an event with the "compare instance variable" condition and set it up as follows:

    Sprite: myscale<1.0
    ---> Sprite: add 1.0*dt to myscale
    ---> Sprite: set scale to myscale

    Note, the first action is the "add to" action under "instance variables" and the 2nd action is "set scale" under "size & position".

    This will need some tweaking to make it happen in one second. As it is now the expression 1.0*dt can be read as 1 per second, but we're going from 0.1 to 1.0 in a second, or just 0.9 in a second. So it should be like this:

    Sprite: myscale<1.0
    ---> Sprite: add 0.9*dt to myscale
    ---> Sprite: set scale to myscale

    Another thing you can deal with if you like is what I like to call over shooting. With this event the end scale will likely be a bit more than 1.0. You can use the min() expression to limit the highest value to 1.0 and set up your event like this:

    Sprite: myscale<1.0
    ---> Sprite: set myscale to min(self.myscale + 0.9*dt, 1.0)
    ---> Sprite: set scale to myscale

    As a final note you can make the duration longer or shorter by tweaking the dt expression.

    half second:

    2*0.9*dt

    two second:

    0.5*0.9*dt

  • Would something like this work?

    global number bspeed=100

    bullet collides with enemy

    pick all bullet

    ---> add 1 to speed

    ---> set bullet speed to bspeed

    The "pick all" condition can be used so not just the bullet that collided is selected. "bspeed" is a global so when you create new bullets you can set there speed bspeed. Of course that's just an assumption, you could also just omit the global and use bullet.Bullet.Speed +1.

  • You can get a screenshot by pressing the "PRTSC" button on the keyboard and pasting into mspaint.

    The image you posted was actually from one of my projects and the cap is in this topic:

    http://www.scirra.com/forum/how-to-make-minecraftlike-lavawater-physics_topic41488_page1.html

    There isn't a direct counterpart of custom attributes in C2 although I think you could do something equivalent with families, Boolean instance variables and some more events. Although I would opt for a different approach.

    For the example of an attribute like "left" you could do something like the following:

    1. Make a family and call it "left_attr" and add any objects that could get that attribute to it.

    2. Add a boolean instance variable to the family and call it "left".

    3. Then in events or the editor you can give the objects the left attribute by setting "left" to true. Also to reproduce and event like "sprite overlaps left" you would do the following:

    left_attr: Is left

    sprite overlapps left_attr

    Oddly enough after I answered your question about growing grass I made a capx to experiment with similar water physics. It's not perfect but it does work better than the CC version. Have a look if you like but be warned I used some math trickery to reduce the number of events.

    https://dl.dropboxusercontent.com/u/5426011/examples19/2dgrid.capx

    Left click to draw walls, right to erase.

  • Cool deal, I should have searched before posting. I may end up using this eventually anyway. It's an interesting way to make an object on the next layout without making the object global.

  • I forgot to search for existing bugs and was informed about this existing one:

    http://www.scirra.com/forum/r116-changing-layout-and-on-destroyed_topic62431_post383279.html

  • Link to .capx file (required!):

    dl.dropboxusercontent.com/u/5426011/bug/bug_negative_objectcount.capx

    Steps to reproduce:

    1. Create a project and add a second layer.

    2. Add a sprite and a particle object to layer 1.

    3. Make the particle object "one shot" and make it's timeout 0.5.

    4. Add two events:

    every 1 second -> got layout 1

    Sprite: on destroyed -> Sprite spawn particles on layer 0

    5. Run in debugger.

    Observed result:

    After the capx restarts the layout about 4 times the objectcount will be negative.

    Expected result:

    It should never go below 0.

    A few more observations about the bug

    It only occurs if the sprite is not on layer 0.

    Browsers affected:

    Chrome: untested

    Firefox: yes

    Internet Explorer: untested

    Operating system & service pack: Vista sp2

    Construct 2 version: 149

  • Aurel

    If you're able to make the object count negative then I'd most certainly say it's a bug that should be fixed. I can't find a way to reproduce it, but if you can make a minimal capx or make your capx as minimal as possible and report it to the bugs forums that would be good.

    While BluePhaze's advise is true in many programming languages, for C2 it's not. It's designed to make it completely safe to still access objects directly after they are destroyed and once they are completely destroyed you can no longer access them.

    ramones

    That seems to be some odd behavior there, so I filed a bug. I would expect no object to survive a layout change unless it were global, regardless what event it were created from.