Mipey's Forum Posts

  • That is not the case anymore. Not on Store page, nor on welcome screen. Are you trying to hide the free bundle? :P

  • You don't need lerp to gradually change the object's opacity. Just do this:

    Showercover.opacity = clamp( Showercover.opacity + speed*sign*dt,0,100)

    • sign is just a variable should hold a signed number 1 (1 or -1) to affect which way the opacity should change
    • speed is to control how fast it fades (5 is slow-ish)

    Oh, and clamp is there to make sure it stops at 0 or 100.

  • https://dl.dropbox.com/u/629300/construct/projects/stealth_game_sight_solution.capx

    It works. The enemy will jump when he spots you, though.

    Now I'm off to sleep, hopefully you'll be able to figure it out! Good luck!

  • I would suggest you add some room to the Y at which enemy can still see the player, though... Like this:

    abs(Player.Y - Enemy.Y) < 20

    So when the player gets within 20 pixels of Enemy's Y position, it gets frisky. You can adjust that for height of enemy sprites too, if you want, such as:

    abs(Player.Y - Enemy.Y) < Enemy.Height

    Depends where you have hotspots, you can adjust at will.

  • I would set it up something like this (+ event, > action, ++ subevent, >> action in subevent, sorry I can't be arsed with formatting, got big enough headache with project of my own :) )

    + Every tick

    Enemy: Set Sight to false (this basically sets all enemies to blind mode...)

    + abs(Player.X - Enemy.X) < 300 (... but right after that, we check for enemies which still see player and set 'em back to true)

    + Player.Y == Enemy.Y (they're on the same platform, as long as player and enemy sprites have the hotspot at same height)

    ++ Is mirrored

    ++ Player.X < Enemy.X

    Enemy: set Sight to true

    ++ is NOT mirrored

    ++ Player.X > Enemy.X

    Enemy: set Sight to true

  • Kid4lynn:

    Could be that you only check for Y position in the first first event. When the player is above enemy Y, first event is false, but second is still true.

  • It's more about math than coding, trust me :)

  • It's basically |Player.X - Enemy.X|

  • No, no, no. Instead of putting Player.Y into the formula, you put 0.

  • And Spritefont has been updated, as well! Practically on the last day of July, heh.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • <font size="4"><font color="RED">NEW RELEASE: 31th July 2012</font></font>

    Download

    I've refactored the plugin itself and the way it works. Should be a whole lot more efficient and stable.

    The downside is, however, that since spritefont now uses in-memory canvas for each instance, more memory is used. However this shouldn't be an issue at all if you don't use too many Spritefont instances. In fact, thanks to in-memory canvas caching the texture, the performance boost is huge as it doesn't need to redraw text each tick you reposition, rotate, resize it.

    WARNING!

    Properties Max Length and Max Lines have been renamed as well as the wording of Resize mode has been changed.

    You must reset those properties for all your projects using the older version of spritefont.

    That is, change them and change back to new property. Sorry for the inconvenience!

    Now, Spritefont should work like it was supposed to. Text alignment should also work properly now (Note: it aligns itself within the "text grid", not bounding box which defines the instance.).

    Let me know if this now works with CocoonJS!

  • The engine first does a very rough check, which excludes any objects outside the maximum possible collision area. This is a very fast check. Then it checks objects within that area using more accurate criteria. You shouldn't have to worry about number of objects, as long as there aren't too many collision checks going on.

  • ArcadEd: That's strange, I can't see why it wouldn't work. I'll have to dig through code thoroughly.

    brent_hamel: Unfortunately I haven't figured that one out. Sorry! Picking stuff is quite delicate and I still haven't gotten it to work properly.

  • ArcadEd: let me know if one uses WebGL and other Canvas2D rendering.

  • Get time whenever you start a level and get it again when you end it, then simply substract. That's your time in milliseconds.

    See the manual for system expressions to help you with.