Yann's Forum Posts

  • septeven I see she works in the same company as me and went to the same school. to be honest her face does tick some neurones so I probably saw her while we were both student between 2007 and 2008. But I don't know her. I'm at the company's place only once a week, I work at home the other days.

    Oh I see... you were at cohl too :D made quite a nice career since then

  • +System: Every tick
      -> Monster: Substract dt from TimeLeft
    +Monster: TimeLeft <= 0
      -> Monster: Destroy
      +System: repeat 2 times
        -> System: create Monster on layer 0 at random(layoutwidth),random(layoutheight)

    Should work.

    It will spawn 2 monsters anywhere in your whole layout for one monster destroyed.

    You don't really need a 'Alive' boolean because the very fact that the instance is not destroyed means that it is alive.

    And indeed you don't need any foreach as long as condition on objects only relate to themselves.

    Also notice that the repeat loop is nested inside a parent condition.

    It's the same idea as

    first condition
    {
      action
      second condition
      {
        action
      } 
    }
  • Hoho quite an interesting topic!

    Well I'm also 27 year old

    I'm currently a 3D modeling/texturing artist in a little game company.

    on this project http://ironmeka.com/

    I'm a self taught programmer. I've been into medical school from 2001 to 2006 (while I learnt html/css/php and a bit of javascript) and then I switched to artschool from 2007 to 2011.

    I began using mmf2 near february 2010 at school for little homework projects. I discovered Construct Classic near the end of 2010 (konjak mentionned it on his website so I though it was worth a try).

    Instantly pleased, I took the risk to do my degree on it.

    It turned out well. I posted a topic on it last summer :D

    http://www.scirra.com/forum/topic43211_post269710.html

    Anyway now I switched to construct 2 'cause it's so much easier to share and well... html5 is the future :D

    Also I'm interested in gameplay around ipad-like devices (you know touch, gyro, accelerometer, etc...) but I don't have any ipad yet so that will wait...

    I still use CC to build some script for work like xml for batch rendering on xNormal or some pixel manipulation thingy.

  • Well, you did say "the higher the speed is then i want the bullet to be dumber"

    So it was just a translation of that

    Now you want it to be dumber when close, it might be weird but it's the same exact idea

    missile: set dumbFactor to lerp(10,0,clamp(distance(missile.x,missle.y,player.x,player.y)/maxDistance,0,1))
    missile: set angle to (player.X+random(-dumbFactor,dumbFactor),player.Y+random(-dumbFactor,dumbFactor))

    Here you will have:

    if distance = 0 -> dumbfactor = 10

    if distance > or = to maxDistance -> dumbFactor = 0

    And all the in-between

    so if dumbFactor = 10 the missile will aim in a 10x10 area around the player.

  • Why do you rotate the layer when you just need to rotate the ship?

    like dat!

    shipLerping.capx

  • your crouch animation have probably only one frame, so you don't get the "freezing" animation effect by calling it every time

  • you can also lerp the value of the randomness

    like

    missile: set dumbFactor to lerp(0,10,self.speed/maxSpeed)
    missile: set angle to (player.X+random(-dumbFactor,dumbFactor),player.Y+random(-dumbFactor,dumbFactor))
  • o_o...

    well you can also do a

    Got to layout (by name): "Layout "&LayoutNumber
  • arandaschimpf

    As long as you use layout or layer angle it's valid. That's what I understood. And it shouldn't look like you added it just for the contest.

    But using layer angle instead of just rotating object around a custom pivot with math is just totally unproductive, more if (as some did) you rotate hidden collision masks on an unrotated layer with the aformentionned formula. You better just rotate the original object "normally".

    That's why I would probably just use layout angle if I were to participate in the contest.

  • Nope you can't unless you use the Canvas plugin, there you can set any pixel you want like "draw point at x,y with color "rgb("&random(255)&","&random(255)&","&random(255)&",1)"

    7Soul must be in a construct classic dream right now :D don't wake him up

  • Try Construct 3

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

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

    Oh! that explain things. I was trying to project the position of an object from an undrotated layer to a rotated one, and as it was moving clockwise, I thought "ok just have to counter-rotate when changing layer so currentAngle-LayerAngle should work"

    And to my surprise it was currentAngle+LayerAngle

    Now that I know that it's the layout that rotate, it makes more sens.

    Anyway, if you wonder how is percieved this "layerAngle" feature, I thought that the main goal of it was to rotate grouped sprites (grouped under the same layer). So yeah if I want to rotate grouped sprites 90 clockwise, I would think that the layer should rotate 90 clockwise. (And in graphic apps like photoshop it's how it is done)

    Also, even if it's a bit away from the point, following this logic, it would be intersting to be able to set the center of rotation, and also to be able to move the layer wherever we want.

  • Hi,

    If you put the hotspot at different location on each image frames

    And if you set the initial frame to another than the first one (0)

    It won't take the hotspot of that specific frame but the same as the first one.

    Even at runtime.

    I made a capx in which I set a sprite with 2 animation frame and 2 different hotspot position (middle and bottom)

    hotspotUpdate.capx

    As you can see the only way to have the proper hotspot position is to change and go back to the animation frame (see the event sheet)

    So I guess it's qualified to be a bug (:

  • ahostbr

    I think the "import sprite strip" does the work well.

    We were told in the blog that some new feature would be available soon for the image editor. In cc you could select an area and then Ctrl+C, change frame, Ctrl+V. Seems to be what you described

  • Yeah usually it's better to group things to avoid code copy/pasting. And grouping things under the same objecttype is a workaround while we wait for families.

    But in most cases, even if families were available, I would still use the same sprite. Because to me it's the same concept "background" and it makes capx cleaner.

    An you can have one collision polygon per frame.

  • Ashley

    %180 ?... isn't that weird?

    181 is the same as -179

    but 181%180 = 1 isn't it?

    Anyway yeah as I said I probably put too much %360

    because at the time, the interpolation kept bugging and I was over cautious (of course the issue were elswhere)