armed10's Recent Forum Activity

  • Overlapping at offset basically takes the collision polygon of your object, moves it according to the offset, and then checks for overlap.

    With is you can check whether you're on top of a platform by moving the collision polygon down, causing overlap only if an object is beneath you.

    deltatime is used to make operations framerate independant. To assure you check for collisions every 20ms, instead of every frame, which may vary (and miss collisions).

  • You could use a boolean like structure.

    you create a boolean variable set to false (or use 0 for false and 1 for true)

    When the enemy sees the player and the boolean is false, shoot and set the boolean to true.

    Then every x seconds, if the boolean is true shoot again.

    if the enemy can't see the player anymore, set the boolean to false again.

  • You should be able to pick a random sprite. I'm not sure whether there was a pick random but if not:

    • Generate a random number using the random function. Its max value should be the number of sprites you have in the map -1 (because of 0-index). Theres a variable for this.
    • Use the random number to get a sprite by its IID (index iD) and get its location.
    • Destroy it.
  • There isn't a way to make html/css tables in construct 2 yet. Otherwise you could just design one here: http://www.csstablegenerator.com/

    To answer your question: you can probably make a function that takes an array as data (2 dimensional) and create a tiled background or a 9-slice with text in it for all entries.

  • Well I don't think a master Z layer exists, it seems to me that your problem can be fixed by using a move to layer

    Assuming the number of layers is the same for all layouts.

    If you want to have a different number of layers on some layouts, you should have a global variable with the number of layers and set it at the start of a layout.

    If this doesn't solve your problem, maybe you should reconsider your layers.

  • jayderyu

    I agree with you, but I fear this would kill the dynamic properties of function, such as project wide referencing without including an event sheet. There has to be some middle ground though.

  • +1

    I would love this too. For now I'm stuck creating global variables with the same name so they show up in intellisense

    That's not a bad workaround, thanks for the tip.

  • One of the things I love the most about Construct 2 is the function object. It allows me to define my own functions and call them from any sheet. I use the function object more than any other object in construct. On top of that it allows me to work more OO keeping responsibilities where they belong.

    There is only 1 downside to the function object: if you make a spelling mistake, nothing will happen and the game doesn't give you an error.

    Having Auto-complete in function would be perfect to solve this issue, as well as stimulate a more structured event sheet. Right now I use "object.functionName" on many event sheets and having auto-complete after I type an object with all the functions matching that name would really make my day.

  • Try Construct 3

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

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

    The textbox describing what to do when creating an event to set the opacity of an object is wrong.

    Attach a Capx

    https://www.dropbox.com/s/3t6il3n6dweb2 ... .48.26.png

    Description of Capx

    I don't think it needs a capx to describe the problem since its a minor visual bug. Nothing is broken under the hood.

    Steps to Reproduce Bug

    • Create object
    • Create event -> set opacity

    Observed Result

    wrong descriptive text. it says: How to compare the X-coordinate

    Expected Result

    Something about opacity.

    Affected Browsers

    In-construct itself.

    Operating System and Service Pack

    Win7 N all updates

    Construct 2 Version ID

    r167

  • Sorry I misused the term instance, I mean an object has the same method name as another. Both included in one layout would give problems.

  • Hi!

    I was just wandering if there are any serious repercussions to duplicating the function plugin and removing the "flags": pf_singleglobal.

    This would allow me to work a little more Object Oriented as well as use duplicate method names (I hope?). For instance have 2 NPCs with a shoot() function that is specifically their own.

  • 2D lighting in webgl would be awesome! I'll follow your progress closely :)

    Thank you, I will keep this thread updated. I also have a rather elaborate prototype due in the next 2 weeks, so I won't be updating this soon.

    The current system works IF you use separate layers for the lights (because of the source-out drawing). The performance of canvas2D rendering this way instead of clip() makes for less performance, though I tested about 6 lights and it worked fine. There is some drop in frame-rate.

    Node-webkit export does have major performance issues with this method.

    My best option is to implement a WebGL version, since this would increase performance and will probably have more efficient image manipulation tools available.

    If interested I will post the Canvas2D version with a tutorial on how to use it, for testing purposes.

armed10's avatar

armed10

Member since 14 Feb, 2013

None one is following armed10 yet!

Connect with armed10

Trophy Case

  • 11-Year Club
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

13/44
How to earn trophies