Nickydude's Forum Posts

  • Using the LIGHTING example that comes with C2 I've managed to create a flickering lightsource around my player (top-down view) by randomly setting the scale of the light sprite "random(0.9,1.1)", which works, but the lighted area 'jumps' as the scale changes. Is there a way to scale smoothly instead of just jumping from one scale size to another?

    You can see what I mean here: http://www.madladdesigns.co.uk/relmquest - use cursor / arrow keys to move.

  • Yeah, that's what I was looking for but I was having trouble with the offset so I created a locator sprite which did the job.

  • It was related to the last question but it's OK. I created a 'location' sprite that moves ahead of the character to check if there's anything there and now it works fine. Thanks for your help though.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks granpa.

    How to I check an offset of an imagepoint?

  • I'm having a bit of trouble on how to add the following to my event sheet:

    When the right arrow key is pressed

    check if the area 32 pixels to the right of the player is empty and doesn't have a 32x32 sprite from the 'NoGo' family

    > if that area is clear then move the player (32x32 sprite) 32 pixels to the right.

    basically everything is top-down 32x32 px and the player 'jump-moves' in 32 px increments from square to square but i don't want him moving to a square that has something there. I did something similar in GameMaker (

    ) and I'm trying to do the same thing here.

    Any help would be appreciated.

  • Here's something i started a while ago with a bouncing character, may be of use.

  • Thanks.

  • Is there a way for an included event sheet to know which layout it is on?

    I've created a menu system (with pressed buttons) using an event sheet to be included on all layouts. I would like to be able to have the image of a pressed button depending on which layout is active.

    For example if on layout one then the first menu item will show a 'pushed button' image whilst all the rest will not whilst if on layout three then the third button will be pressed.

    tldr: I want to pass what layout is active to an included event sheet.

    Any help appreciated.

  • I know how to swipe (on an Android Nexus 7) to move from one layout to another (thanks to jagoman: ), but how do you 'show' the transition? At the moment it just flicks between the layouts. Is there any way as one layout slides to the left the next layout slides into view?

  • Problem Description

    Playing the RTS Template game that comes with C2 (r164). Last player tank object destroyed when the error below occurred.

    Attach a Capx

    No need, it's the RTS Template that comes with C2

    Description of Capx

    Suddenly got this error:

    Stack trace: 
    assert2@http://localhost:50000/preview_prelude.js:12
    Parameter.prototype.get_familyvar@http://localhost:50000/eveng.js:2037
    Condition.prototype.run_object@http://localhost:50000/eveng.js:1290
    EventBlock.prototype.run@http://localhost:50000/eveng.js:787
    EventBlock.prototype.run_subevents@http://localhost:50000/eveng.js:915
    EventBlock.prototype.run_actions_and_subevents@http://localhost:50000/eveng.js:854
    EventBlock.prototype.run@http://localhost:50000/eveng.js:807
    EventBlock.prototype.run_subevents@http://localhost:50000/eveng.js:915
    EventBlock.prototype.run_actions_and_subevents@http://localhost:50000/eveng.js:854
    EventBlock.prototype.run@http://localhost:50000/eveng.js:807
    EventSheet.prototype.run@http://localhost:50000/eveng.js:187
    Runtime.prototype.logic@http://localhost:50000/preview.js:2045
    Runtime.prototype.tick@http://localhost:50000/preview.js:1721
    Runtime/this.tickFunc@http://localhost:50000/preview.js:446
    [/code:1a2mt4o9]
    [b]Steps to Reproduce Bug[/b]
    [ul]
    Play the RTS template and get all player tanks destroyed. No changes made.
    [/ul]
    [b]Repeatable?[/b]
    Yes
        
    [b]Affected Browsers[/b]
    [ul]
        [li] FireFox[/li][/ul]    
    [b]Operating System[/b]
    	Windows 7 Home Premium 64-bit SP1
    [b]CPU[/b]
    	Intel Core i5 3330 @ 3.00GHz	34 °C
    [b]RAM[/b]
    	8.00GB Single-Channel DDR3 @ 665MHz (9-9-9-24)
    [b]Motherboard[/b]
    	Gigabyte Technology Co., Ltd. H61M-DS2 DVI (Intel Core i5-3330 CPU @ 3.00GHz)
    [b]Graphics[/b]
    	2047MB NVIDIA GeForce GTX 660 (ASUStek Computer Inc)	32 °C
        
    [b]Construct 2 Version ID[/b]
    r164
  • Lol! Sounds like you're having fun!...

    "Ahh.. I have this problem...."

    "Wait, no I haven't..."

  • Glad you got it solved but beware that if you have different blocks with different attributes, e.g: sprBlock, sprDoubleHitblock, sprPowerDropBlock, sprTripleHitBlock, and so on then you'll have to have something like:

    if
      sprBlock.count = 0
    and
      sprDoubleHitblock.count = 0
    and
      sprPowerDropBlock.count = 0
    and
      sprTripleHitBlock.count = 0
    ...
    and
    ...
    then go to next layout[/code:2k2znn8w]
    Better to put them all in one family to make it easier.
  • It just so happens I'm making something similar! You can take a look here: http://www.madladdesigns.co.uk/game/invaderoids.

    To change levels when all blocks are gone: place all the bricks in a Familiy (e.g called 'bricks'), and use bricks.count = 0. That's how i do it.

    you can include other event sheets into one. I've created a Player Event Sheet which holds all the bat and ball movements which i then include into all the other event sheets.

    Hope that helps.

  • Thank you Yann!! I Have a maze type game that moves in blocks but was having trouble checking if there was a free space in the direction of movement, you've just solved that!

  • Example:

    When moving right:-

    player.x = player.x + (number of pixels)