heliogame's Forum Posts

  • Cool you can remove that file now. I don't know how it could've worked before but you are trying to create the player with platform behaviour inside the marker object at xy. Better you give it some space so changing to marker.y-20 should work well enough.

    Indeed strange how it worked before, thank you very much. I uploaded the game on Arcade page scirra.com/arcade/puzzle-games/erased-38655

  • here you go

    dropmefiles.com/H2SyD

  • No, the marker is not moved at the start

  • Everything seems to be fine

  • Hi guys

    When I create a player on a layer using spawn marker

    , my player is set at the edge of the tile which is very bad. He is falling down when you start moving.

    I need the player to be placed just right above the tile, not at the edge of it.

    This operation with spawn marker worked perfectly 2 years ago when I uploaded my game supercoloring.com/erased-puzzle-game You can see everything works fine.

    When I open construct project of the game now, I see that spawn marker placement is not working anymore.

  • Hi Players,

    Let me introduce my puzzle game ERASED. Enjoy your adventure!

    http://www.supercoloring.com/erased-puzzle-game

  • Quick test :

    You get an HTTP404 error on Edge

    (XHR)GET - http://www.supercoloring.com/sites/defa ... /intro.m4a

    and the following error :

    WEBAUDIO17014: Decode Error: Stream specified is corrupted or not supported.

    Hope it helps...

    Thank you, it helped. Intro.m4a was absent so I added it. As a result, the game worked in Safari correctly.

    In the Microsoft Edge, it worked as well but partly. The player is now accelerating too much ( it is like on ice ) and some sounds are not producing or modified ( like the player shooting sound is now more surd).

    Should I let it go blaming the Edge or there is something more that I can do?

  • Can you post a link to your exported game so we can try out as well?

    sure http://www.supercoloring.com/erased-puzzle-game

  • Hi guys,

    I published the game as HTML 5 on web (Version 2.40, minified, not full screen, embedded, not using any plugins, do not have any errors in the panel). It works great on all existing browsers except of Safari (ios) and Microsoft Edge (windows 10). Safari and ME load the game fully, show my 2-second logo intro animation without sound, and then freeze the screen (inert forever).

    My question is:

    Do you think that a new version of Safari and ME will probably make it work later? or it is the problem of C2 engine to run correctly games as HTML5 on Safari and ME browsers?

    Did C2, published as HTML5, work in Safari (ios, not mobile) and Edge earlier or it was always like that? Thanks.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This is the case #1:

    1) Bullet hits a tile >> Action

    2) Bullet hits a tile 2nd time >> No Action

    3) Bullet hits a tile 3rd time >> No action

    .....

    8-12) Bullet hits a tile ( choose randomly lets say between 8th and 12th time) >> Go to 1)

    What do we use in this case, what you think?

    The case #2:

    Bullet hits a tile >> Check

    Check1 >> True

    Else >> Choose randomly between X actions ( Action 1, Action 2, Action X, No action)

    Check2 >> True

    Else >> Choose randomly between X actions ( Action 1, Action 2, Action X, No action)

    Check 3...

    Here, I use Local number Which = 0 .

    If I need to make something happen more frequently , lets say I increase the chance that TurretBodyAbove will be created, I do the following

    If I need to reduce the chances of actions within the roll , I do the following

    Is it correct? Are there better ways to do that?

  • >

    >

    >

    > >

    > > Here, we should again to check for location of tiles around each tile of Tilemap1. If any of 5 conditions 1)X,Y+1 2)X+1, Y 3) X-1, Y 4) X, Y-1 5) else is satisfied, we would set particular tilemaps to a tile (X,Y) .

    > > The problem is that there is no overlapping here, no interaction with a tilemap1. How can we randomly distribute tiles of many different tilemaps on a tilemap1 without knowing the coordinates of each tile?

    > >

    > >

    > You need some sort of condition to know where to place the tiles. So placing them without knowing under what conditions you want to place them is not possible. So you have to have some rules.

    >

    Ok, but at least can I identify tiles around the hit without setting them at the particular coordinates as you showed in your sample with cactus? The problem is that if I set every tile at the start of layout to design the level I will spend days and nights.

    So, let's say we have Cactuses ( tilemap) and green tiles (tilemap2). When bullet hits cactus , I need to know if there are other cactuses and green tiles around the hit.

    I worked on it using your sample but it seems that C2 does not understand this part

    As a result, it does not recognize tiles around the cactus.

    CapX

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

  • >

    >

    > CapX:

    > https://dl.dropboxusercontent.com/u/109921357/Collision%20test%203/Collision_test.capx

    >

    >

    > >

    > >

    > > CapX:

    > > https://dl.dropboxusercontent.com/u/109921357/Collision%20test%203/Collision_test.capx

    > >

    >

    nimos100

    Great tutorial!

    1) It is strange but when I shoot at the TilemapBoxEnemy, i got Tilemap1 cells generated around it instead of replacing a tile of TilemapBoxEnemy with a tile of Tilemap1. "Text" indicates if there are some log changes.

    Before shooting with Bullet2Player

    After shooting with Bullet2Player

    Here is my code

    Object coordinates defined and converted

    Bullet coordinates defined and converted

    2) I would want actually to complicate even more the code by adding another sub condition with comparing instance variables.

    Visually, it would work in that way:

    The bullet2Player overlaps TilemapBoxEnemy.

    If there is a TurretBody around a tile of TilemapBoxEnemy, the bullet2Player is just destroyed.

    If there is no any TurretBody around a tile of TilemapBoxEnemy, the bullet2Player is destroyed and we check if any Tilemap1 tiles surround a tile of TilemapBoxEnemy. Depending on the location of Tilemap1 tiles we set different tiles to tile of TilemapBoxEnemy. For instance, there is a tilemap1 (X, Y+1 ) in relation to a tile (X, Y) of a TilemapBoxEnemy, so a tilemap1 or tilemap4 replaces randomly an overlapped tile of TilemapBoxEnemy.

    Tilemap1 replaces a tile.

    or

    Tilemap4 replaces a tile

    or any other tilemap replaces a tile indicated in a random basket of tilemaps. Here I wonder how can we control a random frequency of a particular tilemap appearance.

    So the code of the additional sub condition is the following

    3)

    To continue a topic about random tilemaps,

    let's say we created the level which consists of arranged tiles of Tilemap1.

    Can we on start of layout to set random tiles of other Tilemaps to Tilemap1?

    For Instance, on start of layout some tiles were changed

    Here, we should again to check for location of tiles around each tile of Tilemap1. If any of 5 conditions 1)X,Y+1 2)X+1, Y 3) X-1, Y 4) X, Y-1 5) else is satisfied, we would set particular tilemaps to a tile (X,Y) .

    The problem is that there is no overlapping here, no interaction with a tilemap1. How can we randomly distribute tiles of many different tilemaps on a tilemap1 without knowing the coordinates of each tile?

  • >

    > >

    > > So, is it possible to identifiy whether TurretBody is present or not around the TilemapBoxEnemy and how do we arrange these conditions?

    > >

    > If you store the TileX,Y position of TilemapBoxEnemy you can use that to check whether a Turretbody is placed in any of the 4 areas surrounding it if you also store the TileX,Y position for the TurretBody. Then you can just add the position difference to TilemapBoxEnemy TileX,Y position when you need to check it. So:

    >

    > Bullet is overlapping TilemapBoxEnemy

    >

    > //Check if there is a turretBody above TilemapBoxEnemy

    > TurretBody.TileX = TilemapBodyEnemy.TileX

    > TurretBody.TileY = TilemapBodyEnemy.TileY - 1

    > ELSE

    > (There are no TurretBody at that position)

    >

    > //Check if there is a turretBody below TilemapBoxEnemy

    > TurretBody.TileX = TilemapBodyEnemy.TileX

    > TurretBody.TileY = TilemapBodyEnemy.TileY + 1

    > ELSE

    > (There are no TurretBody at that position)

    > ...

    > ..

    > .

    > (And the same with left and right side, just adding +/- 1 to X instead.)

    >

    > If any TurretBody have these TileX,Y coordinate then you know there is a TurretBody.

    >

    > So when you create TilemapBoxEnemy and TurretBody you store there TileX and TileY position in two variables in the object itself and then you can just use these for checking.

    >

    Ahh, I am lost.. Will take a break for a bit to rethink again what you are advising.

    So far , I am stuck on 2 things:

    1) Unfortunately, I am not storing X,Y coordinates of TurretBody. At least, I cannot use them since they are in a separate event where another bullet overlaps TilemapBoxEnemy ( i described it earlier)

    .

    It would have been cool to continue this event , since i have all the necessary coordinates of TilemapBoxEnemy and of Turret Body. But I cannot do it cause 2 different bullets cannot overlap an object in the same event. So I started a new event where a new bullet (bullet2Player) overlaps a TilemapBoxEnemy ( A turretBody has been already created so I cannot create it again), and I can store only coordinates of TilemapBoxEnemy. But I understand that without storing of X, Y coordinates of turretBody in this new event , nothing can be done.

    Maybe I should come back to where I started and try to unite again the script that did not work with the main event where a turretBody is created:

    > nimos100,

    >

    > I am wondering what's wrong with the sequence of the following code:

    >

    >

    >

    > When a turretBody appeares , I want to trigger the following events:

    > 1) If turretBody is destroyed with the bullet2Player, tilemapBoxEnemy is replaced with Tilemap1

    > 2) If turretBody is not destroyed, bullet overlaps TilemapBoxEnemy and bullet is destroyed

    >

    2) For checking if there is a turretBody above TilemapBoxEnemy .etc. should I use Compare two variables?

    .

    If so, the system does not understand this expression.

    For "Else", should I use "System - Else" ?

  • >

    > So, is it possible to identifiy whether TurretBody is present or not around the TilemapBoxEnemy and how do we arrange these conditions?

    >

    If you store the TileX,Y position of TilemapBoxEnemy you can use that to check whether a Turretbody is placed in any of the 4 areas surrounding it if you also store the TileX,Y position for the TurretBody. Then you can just add the position difference to TilemapBoxEnemy TileX,Y position when you need to check it. So:

    Bullet is overlapping TilemapBoxEnemy

    //Check if there is a turretBody above TilemapBoxEnemy

    TurretBody.TileX = TilemapBodyEnemy.TileX

    TurretBody.TileY = TilemapBodyEnemy.TileY - 1

    ELSE

    (There are no TurretBody at that position)

    //Check if there is a turretBody below TilemapBoxEnemy

    TurretBody.TileX = TilemapBodyEnemy.TileX

    TurretBody.TileY = TilemapBodyEnemy.TileY + 1

    ELSE

    (There are no TurretBody at that position)

    ...

    ..

    .

    (And the same with left and right side, just adding +/- 1 to X instead.)

    If any TurretBody have these TileX,Y coordinate then you know there is a TurretBody.

    So when you create TilemapBoxEnemy and TurretBody you store there TileX and TileY position in two variables in the object itself and then you can just use these for checking.

    Ahh, I am lost.. Will take a break for a bit to rethink again what you are advising.

    So far , I am stuck on 2 things:

    1) Unfortunately, I am not storing X,Y coordinates of TurretBody. At least, I cannot use them since they are in a separate event where another bullet overlaps TilemapBoxEnemy ( i described it earlier)

    .

    It would have been cool to continue this event , since i have all the necessary coordinates of TilemapBoxEnemy and of Turret Body. But I cannot do it cause 2 different bullets cannot overlap an object in the same event. So I started a new event where a new bullet (bullet2Player) overlaps a TilemapBoxEnemy ( A turretBody has been already created so I cannot create it again), and I can store only coordinates of TilemapBoxEnemy. But I understand that without storing of X, Y coordinates of turretBody in this new event , nothing can be done.

    2) For checking if there is a turretBody above TilemapBoxEnemy .etc. should I use Compare two variables?

    . If so, the system does not understand this expression.

    For "Else", should I use "System - Else" ?

  • >

    >

    > Yes, I previously did all three parts separately.

    > The problem is that I am losing X, Y coordinates in 39 and 40 and I cannot find something to rely upon. A collision of turretBody and a bullet in 40 does not help to define old tilemap coordinates since turretBody is un objet (not tilemap). In 39, I should define again coordinates of the TilemapBoxEnemy after the objet TurretBody is created in the event #37.

    > Moreover, in 39 I got a problem with priority of events. I need to make it trigger only if TurretBody (Important: TurretBody from event #37 only) is not destroyed. If TurretBody (from event #37) is destroyed, 39 event is deactivated for TilemapBoxEnemy (in X,Y coordinates of event #37).

    >

    Im not sure what you mean, I don't see any turretBody in #37 that checks whether its destroyed or not, you mean turretUp? But you create a turretBody in #38.

    Its not easy for me to even understand what the code is suppose to do, so this might be wrong. But it seems to me that you rely on or try to use data that you can't really be sure is correct or not. Meaning that you set GetTileX and GetTileY in 37. So if you need to use these coordinates in another event, you shouldn't rely on the data from this one, unless you are 100% sure that they are correct. So if turretBody is created in #38 based on the condition in #37 that "Bullet is overlapping TilemapTurretUp" and then in #40 "TurretBody on collision with bullet2Player" is using the GetTileX and GetTileY in #37 how can you be sure that these are correct? or are there only 1 bullet, turretBody and TilemapTurretUp on the screen at a given time?

    If you need something like GetTileX and GetTileY in an event like #40 you should store them in the object it self. In your case turretBody when it is created and only use this when you need to get the tile X and tile y position for that object. Otherwise I think you will end up loosing track of what GetTileX and GetTileY is when you need them.

    But as I said im not even sure what exactly you are trying to do. Maybe show some screenshots of what is suppose to happen. But at least to me it seems like you are mixing a lot of objects together without really knowing whether its the correct objects or not or the correct data you are using. How is C2 going to know which turretBody you are referring to in #40 with the GetTileX and GetTileY position you have stored in #37 that rely on a bullet is overlapping a TilemapTurretUp?. If there are only 1 bullet in your game its probably ok, but if there are several bullets GetTileX and GetTileY will constantly be overwritten causing you to not know what is stored in them when you need them.

    Also in #40 you are destroying a Turret object that you haven't picked in the event, if that event is ever true all Turret objects in the game will be destroyed.

    Whenever you work with an object in an event, unless there are only 1 of them. You always have to pick them or things wont work.

    The way I make my events if they are confusing, is to write down each step that I want to happen in them and make each part, that way its very easy to maintain an overview, for instant.

    ///

    A turret consist of 2 parts and if both parts are destroyed the whole turret should be removed. If only 1 part is damage, that part should be replaced with a damaged part until repaired or the other part is destroyed as well.

    1. Bullet hit Bottom part of turret

    Deal damage to turret

    2. Check if Bottom part is destroyed

    3. Check if Top part is destroyed

    3a. If top part is also destroyed, destroy whole turret.

    3b. top part is not destroyed, replace bottom part with a damaged part.

    So based on this example I know there are 3 objects involved (Bullet, Top part of turret and Bottom part of turret) so i have to pick all 3 parts to complete the event. And normally I do all picking as early as possible, because then you know you have the stuff you need to complete the event.

    I rethought the concept of events.

    Here is the starting point

    Or it can be like that

    So when a bullet2Player overlaps TilemapBoxEnemy,

    we identify the coordinates 0,0 and then this event should trigger 2 different actions depending on the condition.

    Condition 1: At least one TurretBody is present in any of these coordinates (see in circles)

    IF Condition 1 is satisfied THEN bullet2Player is destroyed

    Condition 2: No TurretBody is present in any of these coordinates (see in circles)

    IF Condition 2 is satisfied THEN bullet2Player is destroyed and TilemapBoxEnemy is replaced with Tilemap1 (set tile X, Y)

    So, is it possible to identifiy whether TurretBody is present or not around the TilemapBoxEnemy and how do we arrange these conditions?