tarek2's Forum Posts

  • Awesome! Thanks for the Key I will give it a go as sooner I have some Time

    Congrats For your First Release Game and Good luck with the Sells

    I used This Key:

    VMTAF-6AFW2-7YZRX

  • The Instance Variable has to be (Type = Txt) to be used with a string, at the moment you have the Instance Variable as = Number,

    However, you can still use it with an Instance variable = Number as longs you convert it to a Number with the Expression "Int"

    Example:

    int(tokenat(text, 0, "|"))

    The only problem with this is that it will round the Number and you will lose the (.4)

    Not sure why Globals can use it and Instances Variables Not

  • Update:

    Finally, I saw some Light and understood why is working the (Tilemap.TileToPositionX(loopindex("Y")))

    It's because your Map it's perfectly aligned on the Grid and the Origin Point of the TileMap (0,0) also the Tiles are symmetric 64x64

    So even that the true it Loops Retrieving the X-Coordinates Of the Tiles using the Index of Loopindex("Y") but because the Tiles are symmetric and Both Indexes start at 32

    Example:

    (Tilemap.TileToPositionX(loopindex("Y=0"))) >>>>> 32px at the X Cordinates

    (Tilemap.TileToPositionX(loopindex("Y=1"))) >>>>> 96px at the X Cordinates

    (Tilemap.TileToPositionX(loopindex("Y=2"))) >>>>> 160px at the X Cordinates

    (Tilemap.TileToPositionX(loopindex("Y=3"))) >>>>> 224px at the X Cordinates

    Etc.....

    Will be the same as if you used TileToPositionY

    (Tilemap.TileToPositionY(loopindex("Y=0"))) >>>>> 32px at the Y Cordinates

    (Tilemap.TileToPositionY(loopindex("Y=1"))) >>>>> 96px at the Y Cordinates

    (Tilemap.TileToPositionY(loopindex("Y=2"))) >>>>> 160px at the Y Cordinates

    (Tilemap.TileToPositionY(loopindex("Y=3"))) >>>>> 224px at the Y Cordinates

    Etc...

    This Time you been Lucky as the TileMap was aligned to the Grid :)

    But if the TileMap wasn't Aligned to the Grid Example:

    TileMap Position at (250, 92)

    and the First Tile Coordinates will be at (X=282, Y=124)

    So if you use the same System as you did to Retrieve the Y-Coordinates

    (Tilemap.TileToPositionX(loopindex("Y=0"))) >>>>> 282 px at the X Cordinates (Wrong)

    Vs

    (Tilemap.TileToPositionY(loopindex("Y=0"))) >>>>> 124 px at the Y Cordinates (Correct)

    as you can see the Results can be very very wrong, Conclusion the sooner you start using the correct expressions the fewer mistakes and headache you will have in the future, even if it did work this Time swapping the Loopindexs is not guarantee it will work next Time, but if you use always the correct Expressions you will have peace

  • It might be a bug that has been around for while that causes the Games to Freeze although those Bug Reports are specific for ios and you are on Android but it might be related

    https://github.com/Scirra/Construct-3-bugs/issues/2553#issuecomment-467673506

    https://github.com/Scirra/Construct-3-bugs/issues/2548

    it looks like shortercode found some Fix

    Check the Browser Log if you see any Error Like >>>Failed to Load Textures then you know is the same Bug other ways will be something else

  • > > Thanks for the push into array hint, it helped me, man. The only moment is I had to use push forward instead of push back, but anyway I`m satisfied with the result, though I am not quite sure about how it works, to my shame.

    > >

    >

    > No Problem mate,

    >

    > Are you sure that is working Properly?

    > -Because after you Push you are using (Array.CurX) which is meant to work only with Array "For Each

    > Element" if you use Push Front you can use Directly ArrayX = 0 probably that's why it worked for you as you don't use the "For Each Element" so when you use Array.CurX it will be always at = 0

    >

    > -Edited

    >

    > -And also you are storing Twice (TileToPositionX) Instead of Y

    My intention was to make a path for an object step by step which begin from ID0 tile and continue along ID1, ID2, ID3, ID4 etc.

    See my new capx with a path and an object: dropbox.com/s/vq1ikzdwyfgfsek/waypointsTest2.capx

    It`s moving as it supposed to, even if I`m using (TileToPositionX) twice, actually if I change the second one to (TileToPositionY) nothing changes, atm I don`t have time to dig it, maybe in the future if it will cause a bug :-)

    Ho I see,

    you were on the good track then

    I still breaking my head how that (Tilemap.TileToPositionX(loopindex("Y"))) is giving the Right (Y-Coordinates) lol I gave up maybe another Day I will try again :), If anyone has any Ideas please share. As I would spect to give all the Y-Coordinates wrong like on this Example:

    https://www.dropbox.com/s/2zccpv4qk0rbx12/1-Debug.capx?dl=0

    If you click on any Tile it will give you the Correct Coordinates at the Top-Left of the Screen, as you can see if we use (Tilemap.TileToPositionX(loopindex("Y"))) it will give all Wrong Y-Coordinates

    unless you change it to (Tilemap.TileToPositionY(loopindex("Y"))) how it should be.

    Anyway I made a minor modification to your Capx at the Moment you calling "movePlayer" and loop throughout the whole Array each Time until it finds the Matching WayPoint, you could save the Looping but just calling the Waypoint Matching the Array Index you just have to sort out the Array.

    Example

    Array X=0 >>>>Waypoint 0

    Array X=1 >>>>Waypoint 1

    Array X=2 >>>>Waypoint 2

    Etc....

    You can do this Array sort out easy because you are matching the (Waypoint = TileID) so you just have to sort out the Array on the X axis

    https://www.dropbox.com/s/7403uxmfir225ip/fill%20an%20array%20with%20tilemap%20tiles%20coordinates.capx?dl=0

    Good luck and have Fun

  • Thanks for the push into array hint, it helped me, man. The only moment is I had to use push forward instead of push back, but anyway I`m satisfied with the result, though I am not quite sure about how it works, to my shame.

    No Problem mate,

    Are you sure that is working Properly?

    -Because after you Push you are using (Array.CurX) which is meant to work only with Array "For Each

    Element" if you use Push Front you can use Directly ArrayX = 0 probably that's why it worked for you as you don't use the "For Each Element" so when you use Array.CurX it will be always at = 0

    -Edited

    -And also you are storing Twice (TileToPositionX) Instead of Y

  • You are Looping throughout the Whole TileMap Which has 20x20 = 400 Tiles but your Array size its only 10x3

    also, it's not very clear how you trying to save you Logic as to save on the exact coordinates that match the TileMap you need to use 2D Coordinates Example Array.At(X,Y)

    then save the (TileID, X Coordinates, Y Coordinates) on the same Array Location separated by commas

    Or

    If you don't really need to match the Array.At(X,Y) to the TileMap Tile(X,Y) then you can set the Array Size at the start of the layout to Size = (Width =0, Height =3)

    Then Push Back on the X = Tilemap.TileAt(loopindex("x"), loopindex("y"))

    Then Set (Same X, 1) = Tilemap.TileToPositionX(loopindex("x"))

    Then Set (Same X, 2) = Tilemap.TileToPositionY(loopindex("y"))

    Like you were attempting to do, so you End up with

    Array X all the Tiles Number

    Array Y = 1 >>>All the X Positions

    Array Y = 2 >>>All the Y Positions

  • Gellowg

    It seems like there are some problems Remote Previewing to ios many people reported including myself this is the last thread

    https://www.construct.net/en/forum/construct-3/general-discussion-7/blank-project-wont-remote-prev-141395#forumPost963996

    Also, there is a Request to include the "C2 Preview" on C3 if you interested to Vote is here

    https://construct3.ideas.aha.io/ideas/C3-I-618

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • SUPER WOW tarek2,

    That's AMAZING!

    Thank you soooooooooooooooooooooooooooooooooooooooooooo much!

    Roberto

    No problem mate, Glad was helpful :)

  • https://www.dropbox.com/s/hwvfsuokjm7yf9j/Erace%20TileMap%20Range%20Radius.capx?dl=0

    This will destroy "Tile_Radius" = Numbers of Tiles in each direction Creating a square, you can modify the Variables range to your like, I hope it helps

  • > Ubru

    >

    > Events uses "MoveTo Action" >> Move To UID as is not supported yet

    Actually i fixed "Move to object" and "Move to UID" actions.

    You can try it from the above link

    Hah Right, I missed that :)

    I didn't think you could modify the MoveTo, that's why you posted the Link I see now, I apologise.

    That's great Thanks mate

    i converted plugin from scratch.

    here

    github.com/erenertugrul/construct-plugins/tree/master/ported_plugins/behaviors/rex_moveto/dist

    That's Awesome its good to have more alternatives especially for MoveTo

    Thanks for the hard work :)

  • Ubru

    If you use the Plugging from chadorireborn from the Link you provided on your first post and you still have the Black Screen problem make sure that none of your Events uses "MoveTo Action" >> Move To UID as is not supported yet, but you could replace them by Move To (X,Y) of that Object Instead of UID at least this is how I got it working for me and it works great I didn't have any Black screen problems since I replace those Actions.

    And if you are interested in to have "MoveTo" as an official Behaviour you can Vote on this Link Request.

    https://construct3.ideas.aha.io/ideas/C3-I-574

  • and sincerely a big thank you, I'm sorry, I must have been a little annoying

    No Problem mate :):) Glad you fixed

  • I didn't check whole your project so I'm not sure how you set up everything I just Looked at the Problem with your Speed, but normally you put everything together (Collisions & Check for Health) on the same Event so if you like to do it in your way you can modify it to your Needs

    here are the Events you need:

  • I would like an enemy to die every timeI'm a little confused, I'm sorry. I have trouble because I don't speak English, I use a translator and it doesn't always translate properly

    I apologise I missed the part where you need to do it after the enemies Die

    is the same thing but you add an extra Condition

    Add a Global Variable = EnemySpeed

    Add an Instance Variable to the FamylyEnemy = Health

    Bullet On Hit FamilyEnemy: Action: Subtract (Your Value) From FamilyEnemy.Health

    SubEvent: FamilyEnemy Health <=0: Action Add 100 to (Global Variable = EnemySpeed)

    ===============================>Action FamilyEnemy Destroy

    SubEvent: System: Pick All _FamilyEnemy: Action set PathFinder MaxSpeed to (Global Variable = EnemySpeed)

    ==============================

    Also Every time you Spawn an Enemy as you do on your Event 47

    add an extra action after you create the object set FamilyEnemy PathFinder MaxSpeed to (Global Variable = EnemySpeed)