dop2000's Forum Posts

  • draiza

    Sorry, I was wrong. Gamepad number is the first parameter of Axis expression:

    Gamepad.Axis(0,1) - means gamepad #0, axis 1

    Gamepad.Axis(3,2) - means gamepad #3, axis 2

  • —

    Yeah, I don't understand why there is no expression to get gamepad number.

    I guess for events like "On key pressed" you'll have to create 4 identical events for each gamepad number. Then redirect them to a function, like this:

    On Gamepad 0 button A pressed -> Call Function ("Jump", 0)

    On Gamepad 1 button A pressed -> Call Function ("Jump", 1)

    For events like "Is button down" you can test all gamepads in a loop.

    By the way, "On gamepad .." events are not very reliable, they can miss buttons if several buttons are pressed simultaneously. Some time ago I made a little engine that only uses "Is.." events, see this post:

    It can be modified to support multiple gamepads.

  • There are many ways to do this.

    Since you are using Flash, simply add condition "Is NOT flashing" to the event where you subtract health.

    (add "Is flashing", then right-click and invert)

    Enemy->Is overlapping Player    Player subtract 10 from Health
    Player->Is NOT flashing
    [/code:2ijy9678]
  • I'm on a 5-years old laptop with i7-3630QM, 8Gb RAM, mid-range SSD, Windows 8.1 64-bit.

    Using C2 build 246.

    Startup time for me is always about 5-6 seconds, even after system restart.

    Not bragging, just providing information

    Many people here with this issue have much better computers, which is really odd...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Wow, R0J0hound, you never seize to amaze!

  • Hi miggymax

    Have you sent it? I received an email from "Justin", not sure if it's you?

  • Tetris is a pretty complex game, are you saying you made it by yourself? And you are asking how not to destroy blocks?

    This is all very strange.

    If your question is genuine, please consider posting your capx or a screenshot of your event sheet.

  • If there are performance issues, try increasing the tile size to 2x2. The edges will look a little bit rougher but the performance should be much better.

    I just noticed than in my demo there are 2 identical instances of tilemap object, one on top of another. And it still works pretty fast

  • I think you need to install NW.js

    https://www.scirra.com/manual/162/nwjs

    Then when you export your project from Construct 2, there will an option to select NW.js and it will make the .exe file.

  • I think you need to add gamepad number after "Gamepad":

    angle(0,0,Gamepad(0).Axis(0,0),Gamepad(0).Axis(0,1))

    angle(0,0,Gamepad(1).Axis(0,0),Gamepad(1).Axis(0,1))

    etc.

  • — Is there a reason why you need JSON?

    You can install Rex's CSV plugin:

    It's great and I'm using it heavily in my games.

    Another option would be parsing CSV into 2D-arrays with events.

    This is quite easy -

    First loop breaks the file into lines using tokencount/tokenat and line break as separator.

    Second loop breaks each line into values with tokencount/tokenat and comma as separator.

  • Do you see if question object actually contains any text after you click it?

    Maybe there is a space before/after the word? Try adding trim() to remove all spaces and line breaks.

    If question.text is empty, maybe you need to add Round or Int before Random(0,26).

    Also, in event #3 you can use loopindex instead of i.

    If nothing helps, could you share your capx?

  • How can I control which player will be controled by which gamepad. I added player number variables.

    See my first comment.

    Before the game starts, ask each player to press a button. Save gamepad number for each player in a variable/dictionary/array.

    When in the game a button is pressed on gamepad N, you will know which player pressed it.

  • Yeah, if you need very complex (or non-polygon, rounded etc.) shapes and pixel precision, the only option is canvas plugin.

    Or you can make some shapes like pixel-perfect circles, ovals, sine waves etc. with math formulas.

  • matriax

    Yes, your method of building tilemap is definitely better if buildings are rectangular. With complex shape buildings you might need to check overlapping for every pixel.

    What do you mean by sprites with alpha? Your buildings will have transparent parts ("windows") and you want to remove tiles in windows?

    You can make windows as another separate invisible sprite.

    So first you fill tiles where building sprites are, then erase tiles where window sprites are.

    Edit: Made a demo, with complex-shaped windows!

    https://www.dropbox.com/s/sywx2gcxi9qsh ... .capx?dl=0

    Cheers for the coffee! <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    Although it's all based on R0j0's original idea, you should be thanking him.