dop2000's Forum Posts

  • Have you tried "Browser-Request fullscreen" after the textbox is updated?

    I personally wouldn't be using the native textbox object on mobile, it doesn't look good and not suited for a small screen.

  • So you set your spritefont text to "300" on start of your layout, but where is the event that updates it every second?

    You update your variable, but not the spritefont object.

    You need to add "Time_Fonts Set text to time_font" into the "Every 1 second" event.

  • Are you sure the problem is with the spritefont and not somewhere else in your code?

    Does it work if you use a text object instead of the spritefont?

    Is your Time_Countdown group always enabled?

    Start your game in Debug mode (ctrl-F4) and check time_font variable - if it's decreasing every second.

  • Add 'Text2' and 'bad' to the same container.

    These two objects will be created together, destroyed together and logically linked to each other.

    When you create bad, text2 will appear automatically. You destroy bad and text2 will be destroyed too.

    So remove steps where you create/destroy text2, you only need to pin it.

    Also, when you have to repeat the same code twice, this means you need to move it into a function.

    Create a function "SpawnBad" and call it when you need to spawn a new enemy.

  • It's the same problem as last time - you are calling function "SetupGlobalVariables" from the Functions group which is still disabled.

  • This should get you started

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

  • I think you should consider changing the mechanics - to just one character sprite..

    This should make your code much easier and may save you a lot of time in the future.

    By the way, since the only difference in appearance between 3 characters is their color, you won't even need 3 different animations. You can just apply a color-changing effect or blend mode.

  • That was a joke

    I did some googling and turned out that parsing comma-separated strings with regex is quite a difficult task. So I copy-pasted that pattern from stackoverflow

  • There are quite a lot of issues with your game. I think they all can contribute to the poor control system, and not only with wall jumps.

    Here are just some that I found in about 2 hours...

    1. Your character sprites have non-symmetrical collision polygons - the distance from the Origin point to the left and to the right of your collision polygons is different.

    As a result, when the character is near the wall and you mirror it (pressing A or D), you character either becomes ~30 pixels away from the wall or ~30 pixels inside the wall. I believe this is the biggest problem which ruins your wall jumping. Also when you just walk to the wall and turn around, your character often jumps.

    Changing the collision polygon fixes this.

    2. As you have 3 characters with platform behavior, event though you disable it for two of them, some platform events are still triggered for inactive characters. For example, Wall Jump2 and Wall Jump3 events are triggered even when character 1 is active. This has at least one bad outcome - your JumpCount doesn't work correctly. There maybe a bunch of other issues with other platform events.

    You need to review all events and make sure that when one character is enabled, the other two are completely disabled (not trigger any events).

    I don't know why you've chosen this mechanics. I think it would be better to have just one character object with 3 different animations. It'd be much easier to code and you could've avoided all these issues.

    3. Events in Layers group are triggered every tick. This may not cause any real problems, but I would definitely fix this too.

  • This may not be the most efficient method, but it works

    Note: When using While like this you need to be aware of the danger of creating an infinite loop. If there is even a slight possibility that the correct x and y coordinates will never be found (say the safeRadius is too big), you should implement some way to terminate the loop. For example a counter - exit the loop if the counter reaches 100.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Do you always destroy a gun after firing one clip?

    Just add another condition to your "On touch end" event:

    System -> Compare two variables -> spBullet.Count=0

    You need to make sure that all bullets get destroyed eventually. You can add "Destroy outside of layout" behavior.

  • Ok, I read a few beginners tutorials on regular expressions and apparently you can parse comma-separated strings with a simple pattern like this:

    (?<=\r|\n|^)(?!\r|\n|$)(?:(?:"(?<Value>(?:[^"]|"")*)"|(?<Value>(?!")[^,\r\n]+)|"(?<OpenValue>(?:[^"]|"")*)(?=\r|\n|$)|(?<Value>))(?:,|(?=\r|\n|$)))+?(?:(?<=,)(?<Value>))?(?:\r\n|\r|\n|$)[/code:2st6x3tn]
    Easy-peasy!
  • Your link is broken.

    Try posting it without the "https://" part

  • You don't need tutorials, just run the game in Debug Mode and explore all tabs, click everything and see what happens

  • RobertoFreemano

    Just to add to Bruno's answer - when you have a problem like this, start your game in Debug mode (Ctrl-F4). You would see that the number of ball instances is 10, as they are all spawned at the same moment.

    Debug Mode is the one of the best features in C2 and everybody should use it!