tarek2's Recent Forum Activity

  • Mmmm Interesting I never need it to Mirror a TileMap and you Right you cannot do it like Normal Flipped Sprites, how about with code will it help you?

    Cpax:

    https://www.dropbox.com/s/nklu7nq1xlc23zx/Mirror%20TileMaps1.capx?dl=0

  • andreluizgollo

    Group "Slow Time Upgrade Levels" On Event 93 is the one causing the problem all your events inside this Group are referencing to "biggergaps_upgrades" for changing animation instead of referencing "slowtime_upgrades" Animation.

    Another thing is that these events runt every thick

    -Bigger Gaps Upgrade Levels

    -God Mode Upgrade Levels

    -Slow Time Upgrade Levels

    -Spawn Chance Upgrade Levels

    you should put them under the Triggers that you have on Group "Upgrades Menu Buttons"

    Example On Touch on "biggergaps_buy"

    Total coins is bigger than biggergap_Price

    Bigger_gaps upgrade < 7 >>>>>>>>>>>>>>>>>>>>>>>>>>>>All your Actions here that you already have plus the ones from goup "Bigger Gaps Upgrade Levels"

    And do the same for all the Group Upgrades

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

    And I would recomend you for the Next Time to not share your whole Project because it can get stolen mate, when they ask you for a Capx project try to remove everything that you can and just leave the code related to the problem just with minimum capx enough to replicate the problem.

    Another benefit of doing this is that while you deleting or recreating a minimum capx most of the Time you will find the error before you post it

    And finally, I would like to say for your first project you did a great job mate keep it up, the graphics look great too, one thing I see you can do quite a lot of optimisation Though, good luck with it

  • CureLovelyWarrior No problem mate

    Don't forget to vote on the Link for MoveTo to be included as Official Behaviour on C3

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

  • Maverick1912 Sure. Here it is.

    https://drive.google.com/drive/folders/15RvNpeaZzh4AHsZvXB7Ix_fXKlCaLrDM

    P.S: btw, it is my first ever game project, on any engine. So don't mind anything dumb you see on the project xD

    andreluizgollo The Link you shared its Looked needs your permission, make sure that the folder its public so anyone can access to it

  • I'd be willing to possibly pay somebody to convert Moveto to work with C3 runtime. (it's already converted for C3 itself, but not C3 runtime)

    Even though there's official tween behavior now, Moveto is too embedded in my project for me to want to do the work of changing all the things that use it.

    PM me how much and I will consider it. Might not have the money right away at the moment but my consideration is serious. :)

    Also, btw, if anybody isn't yet aware, Rex released the source code to his plugins: github.com/rexrainbow/C3Plugins

    If this doesn't work out I'm gonna have to definitely stick to C2 for sure I'm afraid.

    CureLovelyWarrior Check this Thread if you haven't seen it where there are two Links one for (MoveTo Ported to C3 RunTime with a few features Missing) and another Link To Vote for a Request to Include MoveTo as Official Behaviour

    https://www.construct.net/en/forum/construct-3/general-discussion-7/boomerang-effect-bug-c3-runtim-139994#forumPost958563

  • Hey tarek2, here I am again hahaha

    I got into a little problem with the timer again. It works perfectly with numbers below 10, but when it displays a timer of 10 or above, it shows only "10." and doesn't show the decimals... so I figured if I changed the "left(biggergaps_timer, 3)" to "left(biggergaps_timer, 4)" it would work, and it actually did. But now, when timer hits below 10, it shows 2 decimals... like 9.99 > 9.98 > 9.97 and so on. Any way to fix it?

    Hi andreluizgollo

    Try this and see if it works

    Replace the set txt to: left(Timer, 3)

    For this>>>> set Txt to: left(Timer, len(tokenat(Timer, 0, "."))+2)

    I haven't Test it fully but it should work, let me know how it goes

  • Adding a health bar is fine. I ment specifically in your example. You have the blocks in black and the green health bar attached. What if one of those black blocks had a higher health limit? Because the uid is linked, is it possible to increase the health of a chosen black block?

    Hi Freddy33

    That's the thing I was trying to explain to you in my last post, those Capx examples that I gave you it was meant to be just as for helping to explain the UIDs (Pick & Link) so the Health System it wasn't meant to be used as you can see the Health system is very basic and Limited so I was more looking to simplify the code to make it easier and friendly to understand the UIDs thing.

    The problem here is that I put the (Health Life Count and the Health Percentage Bar Display) all in one using the "Animation Frames" meaning they are Fusion together as a pack instead of creating an Instance Variable "Health" and then subtracting the Health amount each hit then updating the health bar percentage according to how much Health is left.

    So adding a variety of enemies with different Health Values you gonna have to count with the Max Health that an enemy can have to add all the Frames to display the percentage Bar.

    Example:

    Enemy1 = Health 10

    Enemy2 = Health 4

    Enemy3 = Health 7

    On the enemy (Health = 10) it will need at least 10 Frames to display the health bar percentage but the enemy with 4 just needs four frames and so on.

    So no it's not gonna work unfortunately unless you create all the Animation for all the possible starting Health separate which is not practical

    As I explained in my Last post you need to create an Instance Variable "Health" so you can have enemies with different Health values, then when you substract the values from health you need to have a Health Bar Percentage system to display the amount of the health still left for this they are many ways so you will have to find the one that you like or works well with your project.

    Here is one way of doing it:

    https://www.dropbox.com/s/pte9rg0hcewcf50/Health%20Bar.capx?dl=0

    If you like it then you will have the opportunity to practice the UIDs thing while you set up the system for all the Enemies.

    Regarding the pin. I found a solution. If I changed the ball to a circle collision polygone it worked, but because of physics the ball jumped around. I created a new ball and it worked fine :-). I downloaded the sprite and had somthing weird happen in the pass. No sure what causes it but only ever had a few "glitches" with this sprite!

    Cool glad you fixed man

    Thank you, You too have Grate New Year and a happy New fresh start on Game Development mate

  • However would this still work if one of the enemy's required more damage to get destroyed? Would you just add another instance variable?

    If you talking about just General "Health" without displaying the Health Animation Percentage then you could do it in many ways, the simplest one will be to create an Instance Variable "Health" then you can do.

    On collision With Object

    ====>>>>Susstract 1 from "Health"

    =========>>>>>>>Health <= 0: Destroy

    And if you need to display the Health bar Progress then I leave you for you to figure it out as they are many ways to do it, you will have to find the one that suits your needs, they are many Tutorials that you could use.

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

    I have tried loads with image points, but no joy. I think its because a ball perhaps? I tried replacing the ball with a stick man and it worked perfect.

    Set Position to Image Points it should work if you set up everything correctly unless is a bug.

    The Shape of the objects doesn't affect in any way, the two important Factors here are:

    When you set Object A Position to Object B ImagenPoint(X)

    Object A:

    Check the Imagen Point = 0

    As this is the Default Coordinates of any Object that Constructs use to Position the objects on the Grid

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

    Object B:

    Check ImagenPoint(X) if the Image Point its placed in the right Location where Object A you need it to be

    And then when you compare Both Image Points you will easily see if they gonna be positioned like you need to be and if not adjust the image Points as you need.

    However, If you think that both have the Image Points in the Right Places, then without seeing a simple capx example will be hard for anyone to help you as it could be many things:

    I would start from checking if Both Objects are in the same Layer or if they are on different Layers make sure that both have the same Parallax as if you place one of them in another Layer that has Example (Parallax = 0 ) you will have to translate the Coordinates from Layer To Layer

  • > Hi Tarek.

    >

    > Thanks very much for such a detailed example. I appreciate it.

    >

    > Even though im still very much a beginner, your example made sense straight away. The way its laid out for sure. Its a really good example. Im just sussing out why it all works together with the events. I do understand somewhat though. I think its the expressions within the events that confuse me the most.

    >

    > I learnt not only about uids, but pinning as well. I knew how to pin, but never used the position on a pinbox like this.

    >

    >

    >

    > Just going to study this so I know the ins and outs.

    >

    > Thanks dude.

    You're Welcome

    I'm just sussing out why it all works together with the events

    If you mean how the UID gets created and saved and then Picked when need it.

    I gave you two different examples;

    1-One for when you create the all the objects on the RunTime is the "On Creation:" Example

    Here as the two Objects (Enemy and Health) are created Together you can save directly the "Health.UID" to the Enemy Instance Variable = "Health_UID"

    Then whenever you need to Pick the Health Linked to the Enemy you use the "Enemy.Health.UID" where is the UID of the Health that we saved on the Start Of layout

    2-The second example is when you have all the objects already created before the Run Time which is the "By Comparing Instance Variables" Example, so you need to link somehow the Two Objects Enemy & Health so we can Pick them and save the UID to the "Enemy.Health.UID" On the start of Layout like we did on Option 1

    But the difference here is that we have to Loop throughout all the Health Instances to see who is Linked to Who.

    This Option requires more To Do as you have to link them by instance Variable and has to be done on the Editor before Run Time.

    If you look at the Enemy Instance Variables you will see "Health_N" and if you look at Health objects Instances Variables you will see "Enemy_N" so these two variables are the one we use to Link them together at the start of the layout so we can save the UID.

    If you look at the editor and check all the Objects Variables you will see this:

    Health_N = 0 ---- Vs -----Enemy_N = 0

    Health_N = 1 ---- Vs -----Enemy_N = 1

    Health_N = 2 ---- Vs -----Enemy_N = 2

    Health_N = 3 ---- Vs -----Enemy_N = 3

    Etc......

    Although you could do this with containers to avoid all extra work is good to know because sometimes depends on the situation you cannot use containers but don't worry you will learn as you go

    Image Points:

    Here is very simple once you do it once.

    Do you know how to Add Image Points right?

    Just in case: Open enemy Object on the Animation Editor Like on Picture

    -Press on number One 1

    -On number 2 I added an Imagen Point with the + Sign and this image point is the second one so it becomes as Index = 1 as you can see on the Picture

    -Now while you are still on that image point Move the Position to where you like it to be, see Number 3

    And that's all, then when you need to reference any image Point you just enter the Number of the Index of the Image Point.

    You can also reference Imagen Points by Name

    Example:

    Instead of set position to image Point =1

    You could do

    set position to image Point = "Health"

    Where "Health" is the name That I give to that Image Point

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No Problem mate, Glad it helped you

    For some reason using the operator < doesn't work but having a = does. I think that was part of my mistake.

    I can't see your events but if you have something similar to the Picture of your Events from your first Post here are a few things to take into consideration:

    -Any Empty Tile will have (ID = -1) so when you comparing using just "<=" Less or equal (2) it will include all the Empty Tiles as they are less than (2)

    you could fix this by a second condition

    (=> 0)

    or

    = -1 <<<<<<<Inverted Negative (Meaning not equal) -1

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

    -The second thing is the order of the Events it's Very Important as you can see on your Picture you Delete the Tiles before you make the comparison to add the Points and as Result Every single Tile before Rich the Event where you compare the Points will be (ID = -1) so deleting it should happen after you update the Points

    If any of these Two things don't Fixe it I'm not sure what it could be

  • Hey Freddy33

    No Problem mate I'm Glad that helped you

    Before anything, I would like to point out that the Post got deviated and that we are talking about how to store UID and Pick them in general so what I'm about to write it has nothing to do with your original problem which it got fixed already as you didn't need to Pick by UID, I say this just in case because I don't wanna confuse you, so now we are strictly talking about how to Store UIDs & Pick them in General.

    Although I am unsure on how to go about creating an instance variable with a uid so this dosent happen?

    Would be easier if you give any Example of any situation that you need to store UIDs so you can easily relate to it other ways its impossible to give an example as the range for Picking are endless and it varies depends on the situation or Mechanics that you are doing.

    There are many Types of Picking as an example you got

    -Pick By (IID or UID)

    -Pick By "Comparison"

    De difference between (IID or UID) Vs "Comparison" is that Picking by (IID or UID) Picks directly the object or Instance without looping through all the Objects or Instances as Opposite of Picking by "Comparison" which has to loop through all the Instances of the Object to filter who match the "Condition" therefor adding them to the "Picking List" which means they are automatically Picked so any Actions that you have on that Event they will Apply to all the Instances Picked on the Picked List

    So if you have a lot of Instances of an object the best results you can get its to pick by "UID" whenever is Posible to avoid unnecessaries Loops. But if you don't have many Instances Picking by "Comparison" its fine

    As you can see Picking By (IID or UID) have only Two Possibilities but Picking By "Comparison" has a huge range of possibilities that you can use to give some examples:

    You can use them To Pick or you can use them to filter the already Picked List

    Example:

    -Is "Attack" Animation Playing?

    Any Instances that matches the Condition is Picked so any Actions from this event will apply to all the Picked instances that are Playing "Attack" Animation

    -Is Frame = "5"

    The same as above any Instances that have (Frame =5) are Picked

    Some Times it's not enough with one condition to filter the ones you need to Pick so you can add as much as conditions as you need

    Example Two Conditions:

    -Is "Attack" Animation Playing?

    Is Frame = "5"

    So here unless the Instances are Playing Animation "Attack" & the Frame =5 they will be not be Picked but any instances that match both conditions it will be Picked

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

    So basically Anything that you can use as a reference to Pick the ones you need its good, this will vary depends on the many situations you will encounter, there is no specific method to Pick, the method will be based on the circumstances, example someTimes you will Pick by

    -Instance Variables

    or

    -Booleans

    or

    -Positions

    or

    -Behaviours

    Etc.... etc...

    And finally just to give a random example as to how to store and Pick by UID most probably has nothing to do with your Project but it is just to have an overview. Although you could do this with containers without the Need of UIDs it is just for training purposes

    On Creation:

    https://www.dropbox.com/s/bsziylubzheuqxb/1-Pick%20By%20UID.capx?dl=0

    By Comparing Instance Variables

    https://www.dropbox.com/s/llf5bcub30h1pny/2-Pick%20By%20UID.capx?dl=0

    I hope you get an idea and that I didn't confuse you

  • KSLR I'm not sure if I understood correctly if it's not what you looking for let me know

    https://www.dropbox.com/s/omvg3lelnl5gxxc/TileMap%20Erase%20Zone%20%26%20Add%201%20To%20Points.capx?dl=0

    They are two Tiles = 0

    And Two Tiles = 1

    So The Points Variable it should be equal = 4 by the end of the Loop

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

    And if for example, you need to check a bunch of numbers that you not able to use the expressions (< OR >) "lower or Less" for example Tiles (0,1,12)

    you can do something like this:

    https://www.dropbox.com/s/0qgfkwv3wphl1rs/TileMap%20Erase%20Zone%20%26%20Add%201%20To%20Points2.capx?dl=0

tarek2's avatar

tarek2

Early Adopter

Member since 26 Jan, 2016

Twitter
tarek2 has 12 followers

Trophy Case

  • 8-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • x5
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

15/44
How to earn trophies