nimos100's Recent Forum Activity

  • Hello i'm new on this forum and i've been using Construct 2 for a month. I want to know how to make an "enemy damage health text that resets every time i kill one". I explain better, i created a global value that every time i shoot an enemy by gun, the text score decreases his value by one and it resets when the health's enemy gets the 0 value. The problem is, when i shoot an enemy without killing it, the text doesn't reset and when i try to shoot a new enemy the value continues decreasing..

    I hope i explained well and someone can help me

    You cant use a global variable to keep track of enemies health. The reason is that you might have several enemies with different health values.

    So to make it work you need as many health values as you have enemies. So making them as global variables are very inefficient, instead you make a variable in the enemy object itself and call that "health" or whatever.

    Then when an enemy is hit by a bullet you use this value and display that in the text object that shows the health. Something like this:

    Bullet on collision with Enemy -> 
         Enemy.health = Enemy.health - 1
         Text.text = Enemy.health
    [/code:1uydszi5]
  • Bound to layout behaviour update

    The bound to layout is a quick way to keep objects within boundary limits. However this behaviour runs into problems if objects that fits the layout are suddenly rotated. In this case the object will start flickering as it tries to stay within the layout. So a minor update to this behaviour could fix it.

    Fit to layout - When this is turned on, an object will automatically scale to fit the layout in case it becomes to big.

  • Problem Description

    Not sure if this is related to the BB, Drag/Drop or bound to layout behaviour. But when an object is bound to layout using the behaviour and the object is dragged off screen the position returned from the BB values are incorrect compared to what you would expect.

    Attach a Capx

    https://dl.dropboxusercontent.com/u/109921357/BB%20bug/BB_bug.capx

    Description of Capx

    A sprite and a list, dragging the sprite towards the top of the screen as if you wanted to drag it off screen, will fill the list with values return by the BBtop position.

    Observed Result

    Layout

    Dragging the sprite upwards

    As seen the list is populated with negative values from the BBtop return value, even though the sprite is bound to layout and never leaves it.

    Expected Result

    That the returned BBtop value would return 0 as its bound to layout.

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (YES)
    • Internet Explorer: (YES)

    Operating System and Service Pack

    Windows 7

    Construct 2 Version ID

    r216

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Support for multiple aspect ratios

    The fullscreen in browser settings are really nice when you want your game to support several resolutions. However a huge limitation occur when you want to support multiple aspect ratios.

    For instant the most common used ratios are 16:9 (1680x1050) and 16:10 (1920x1080), however there are no way, as far as I can see that you can make your program support both of these correctly when using "Request fullscreen in browser". And regardless of which method you use (Scale outer or letterbox scale) you are left with black bars either in the top and bottom using letterbox scale or only bottom using Scale outer. Since C2 can already support a single aspect ratio, extending this to be able to support multiple ratios would be a huge improvement I think.

    As an extension to the former suggestions regarding "Screen resolution", it would be nice with the following.

    Get system aspect ratio - Would return the aspect ratio of the system.

    Extend the fullscreen browser methods - The ability to tell C2 to target specific aspect ratios, so instead of just "letterbox scale" it would be "letterbox scale - (16:10)", "letterbox scale - (16:9)" and so forth. These methods should also be available in the browser object when requesting fullscreen mode.

  • Problem Description

    If a bullet is told to bounce of another object and the speed is set to 0, the bullet will jump to a X,Y coordinate of NaN, NaN.

    Attach a Capx

    https://dl.dropboxusercontent.com/u/109921357/Bullet_bounce_bug/Bullet_bounce.capx

    Description of Capx

    A sprite with platform and bullet behaviour, when the sprite is moved in contact with another sprite, its told to bounce off it with 0 speed.

    Steps to Reproduce Bug

    Press D to move the sprite into contact with the other sprite.

    Observed Result

    The sprite with bullet behaviour disappears and according to the debugger it is moved to an X, Y coordinate of NaN,NaN

    Expected Result

    That the sprite would stop next to the sprite when it contacts.

    Affected Browsers

    Operating System and Service Pack

    Windows 7

    Construct 2 Version ID

    r216

  • I had this issue way before 216, but forgot to make a proper report, hope this will allow Ashley to fix it.

    Yeah its weird how a bug like this haven't been reported a lot of times. Because you would assume many people would run into similar problems.

  • Problem Description

    The line of sight behaviour doesn't work if the objects are part of a family.

    Attach a Capx

    https://dl.dropboxusercontent.com/u/109 ... s_bug.capx

    Description of Capx

    Shows the difference between using a family and non family when testing for line of sight.

    The green squares are in a family with the LOS behaviour added to it and the blue squares ain't. The code for both of them are the same. The UID of the squares that have LOS to the red square will be written in the appropriate list. So would expect these to have the same output.

    When running the program its clear that the green square ignore the LOS test. Where as the blue square doesn't

    Steps to Reproduce Bug

    Start program.

    Observed Result

    Objects part of a family are not working correctly with line of sight tests.

    Expected Result

    That it would work the same whether the line of sight behaviour were added to the individual objects or the family

    Affected Browsers

    Operating System and Service Pack

    Windows 7

    Construct 2 Version ID

    r216

  • You can download NW.js yourself from their site and copy the package.nw file that Construct 2 exports over to whichever version you chose, and it should work with that version of NW.js. We have to update NW.js at some point, and the first beta release in a beta cycle is probably the best time to do that. There were several other bug reports affecting NW.js that were Chromium bugs that were long since fixed, so older versions are not necessarily less buggy. Hopefully we can get NW.js 0.13 working reliably through the next beta cycle.

    Cheers Ashley and don't get me wrong, I love any updates added. My thoughts were just that the general bug fixes for C2 could have been added in a r217 release. And a major update like NW.js in r218 on its own.

    Anyway ill have a look at copying the package.nw file.

    Thanks

  • I hope someone can answer this, if not at least I hope Ashley will. I made the bug report regarding the audio resume not working and its great that it got fixed.

    However since I made the report and this wasn't something that I found out by accident, but its a bug in my current program that I of course would like to get fixed by updating to r217. However my program also rely heavily on NWjs. Said in another way, without it, my program can't run.

    However reading other peoples posts, including the r217 release note, I don't feel like I will be able to use the new alpha version of NWjs, without it causing some serious problems for my program.

    Why some general bug fixes are entangled with some alpha release of NW.js which clearly stated several places are causing a lot of problems I really don't understand, even if r217 is a beta release.

    I assume that if something is wrong with the bug fixes in C2, these can be sorted, but any bugs found in the required NW.js alpha will not be. And since its not possible to apply the C2 fixes without also applying the NW.js as well, its not in general a good beta release.

    Everything as it is now works "fine" with the last NW.js except the audio resume. So is there any way to fix that, without having to update NW.js as well?

    Maybe like installing r217 to another location and copy over some files which will fix this bug or something, so I don't have to update to the new version of NW.js. Its a bit frustrating to make a bug report for something, because its actually a bug you experience, seeing it will get fixed, and then when it does, you can't do it, without the risk of ruining your whole program.

  • okay, got it, i now want to make multiple collision polygons on image... is this possible?

    No, you can only have one collision mesh per sprite. What you can do, also to reduce the number of collision points in the mesh, is to create collision sprites, these you place where you want collisions to happen and then turn them invisible. So you don't use your actually level image as collision mesh but these. Just make them small (32x32) in the sprite editor and then you increase there size in the editor it self, to reduce the amount of memory used.

    Alternative you design your level, so you have a background, and then all the parts you want the player to collide with you add on top of the background and then you can set up collision for these.

  • Thanks for your reply!

    I expected to need a workaround like that.

    However wouldn't it be possible to start the NW.js twice with the same parameters out of C2?

    I guess that would need an implementation in the program itself.

    Maybe a feature request could help in future

    Thanks again, have a creative day!

    Yeah it would be a nice feature I think

  • Dear People,

    is there a possibility to start NW.js multiple times when previewing the game?

    When i'm trying to test a multiplayer game i can simply preview it in a browser by open as many tabs in it as i want.

    However the NW.js only starts once. It would be awesome to be able to open multiple windows cause whenever i'm previewing stuff the tabs (and in this case the NW.js windows) would reload.

    Is there a way to do that or do i need to make a feature request somewhere?

    Thank you!

    This is not a feature built into NW.js it seems, however you can "trick" it so its possible, if you do like this:

    1. Open C2 two times and load in the project in both of them.

    2. In the project properties panel for one of them you change the project name. So if your project name is "Multiplayer car simulator" then you just call the project name "Multiplayer car simulator 1" for instant in one of them.

    That will allow you to run two versions of the same program. However not sure how it makes your program behave, but at least you can do that way.

nimos100's avatar

nimos100

Member since 23 Sep, 2012

None one is following nimos100 yet!

Trophy Case

  • 12-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

16/44
How to earn trophies