99Instances2Go's Forum Posts

  • If you know the tile, you know its X and Y coordinates.

    You can convert between tile positions (px,py) and layout co-ordinates (x,y) using the PositionToTileX/Y and TileToPositionX/Y expressions.

    There must be something that is specific for that tile. You have 'painted' it on the map.

    On the moment that you are 'painting' tiles, you see numbers in the tilemap bar. That is the ID of that tile (zero based). Once you painted a "square" on the map. I gets a position, in the form of numberd positions. (forgot if its zero based, i suppose so) Positions are like 4th sprite from the left, 2nd kolom. Or px=4, py = 2.

    The condition > Tilemap > Compare tile at px=4 py=2 will give you the ID of that tile. The ID refers to wich square you painted in there.

    If the ID matches the square that you want to pick. Translate its px,py to real layout x,y coordinates.

    You can ofcours loop true the tilemap with a px and py loop and compare them one by one.

    So far for the system you asked to explain. But in the end you dont seem to care that much.

    Your tile is at px=2, py=1.

    So if you place on object on the x,y of that tile you set position of that object to

    (for x) Tilemap.TileToPositionX(2)

    (for y) Tilemap.TileToPositionY(1)

    But, i told you that allready.

  • The save/load captures the exact moment in time - so yes, just save the state off your game after you destroy the object.

    Why are the System Actions Load & Save (as mentioned above) no solution for you ?

    It sounds to me like 'I want to drive' and 'but i dont want wheels'. What am i exactly missing?

  • Photoshop has a scale nearest neighbor option. Use it for a nice "pixelated" upscale. Upscaling in C2 will only make it more blurry.

    Well yeah, that is the point that had to be made, and i tried. Hunting down the cause. What is mentioned here i not a little small issue. It is very much disturbing, well, scary even. I tried to take that parcour. I need reassurance. Or be able to wave it away as a breeze in the morning. So far, nothing in here helps me to decide.

  • saiyadjin, positions in C2 are decimals. Distance is A^2=B^2+C^2. A,B beeing decimals, C beeing like 'super' decimal as a result.

    Small chance that two sprites will be on the same distance. Very small.

  • for example: if the defaoult are the arrows...but i like to change them and save the controlls to asdw keys...

    Well if the question is only: how do i use other keys then de default keys ...

    See here:

  • The expression Keyboard.LastKeyCode will give you the code for that key. So make a interface and let the user press keys.

    Store that code a variables, in a dictionary, in an array, in a list .... whats best for you.

    Use Local Storage Object.

    Keyboard.StringFromKeyCode(Keyboard.LastKeyCode) will give you a key as a string. Use that to show the user what he has pressed.

    If you do this, you wil have to use the conditions 'Key code is down', 'On key code pressed' and 'On key code released' solutions, and compare them with you variables.

  • The Tilemap object.

    You have all those conditions/actions/expressions to adress and manipulate a certain tile.

    https://www.scirra.com/manual/172/tilemap

    So, adressing the tile should be easy, its has x/y coordinates.

    Also the source squares in the tilemap are numberd. Setting one as a tile should be easy. The numbers you find in de Tilemap editor.

    So far i understand the question. I dont understand the reference to 'sprites' in the question.

    Either you use sprites on a grid. Those sprites you can give frames, and those frames can loop automaticaly, creating an animation.

    Or you use the Tilemap. Now, i have not seen someone yet making animations into a Tilemap by swapping squares.

    Its is possible for sure. Its an idea that i will try, never thaught of it before. You just use 'set tile'. All frames have to be in the Tilemap.

    Third option. Interpreting the question a bit differend. You want to place a animated sprite above a certain tile in the tilemap. For that you have the Tilemap expressions:

    TileToPositionX(x)

    TileToPositionY(y)

    Convert a tile position to layout co-ordinates. For example, this can be used to position a Sprite object on top of a given tile.

    Hope i did't guess to much.

  • The manual will teach you this:

    Compare current value

    Only valid in a For each element loop, either as a following condition or in a sub-event.

    It clearely states that those two are a pair, that has to be used as a pair. Where is the For each element loop in your code ?

    I would love to help you. But, honestly, will you understand the word and terms i use, if you have not read the manual?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think zeropad(variable,1) will help you.

  • Any difference between 'accumulating points' & 'accumulating score' ?

  • If i may add one more thing.

    When i made this example for the forum ... i noticed that it in 'debugging' runs at unbearable framerates. While it runs perfect and smooth outside the 'debugger'. I know that the code is not that optimized, its just a quick example.

    So i really think that one should not be botherd by 'debugger framerates'.

    For future reference.

    https://

    drive.google.com/open?id=0B1SSuCVV8v74SUhZRXdVRTdZc1E

  • Okay, you did't bother to look at that example.

  • Then the suggestion i gave you is a good solution. With as less as a performance drop as possible.

    I dont think you can attach a behaviour to the keyboard object type.

    Instead, attach it to the hero. Because. Well the 'on timer' will also set the hero selected that way.

    Easy to fire from predefined imagepoints on the hero, or from whatever position, i suppose the position from where the firing is happening is linked somehow to the position of the hero.

    That is another huge plus of the timer behaviour. No probs with picking.

    I had that issue, under the circumstances as discribed.

    *** i rest my case ***