tarek2's Recent Forum Activity

  • andreluizgollo

    Haah Righ, I'm glad I asked then :) for one moment I thought you referring to (shortening or converting) the Number so it looks nice and centred

    Example:

    100.000 To 100K

    1.000.000 To 1M

    I see that you got plenty of helpful Answers cool

  • Hi andreluizgollo is not very clear what you are trying to do, you say centred but on both Pictures they look centred on the same position basically they look the same, are you referring to something else?

  • Freddy33

    Right, you using the Editor I see now, I wouldn't recommend you to rely on the Editor though, the best thing is to get used to saving the UIDs that you need on a Variable at the start of the Layout. To have more control and freedom.

    Example when you work on the Games you are constantly changing things Testing, updating and deleting sprites events etc... so what I'm trying to say you don't wanna get your Events to lock to one concrete UID from the Editor, instead what you could do is to Lock them to one "Variable" so at the start of the Game you set that variable to the UID you need. This way you don't have to be worry if you delete the specific UID that your Events where targetting because they could change if you are not careful by deleting them by accident and creating new sprites on the editor making you hunt and change all the events that where Referencing the UID, and this only if you are lucky to be aware that you deleted the UID that you were targeting as it could happen that you delete it and you not aware that it was the one with that specific UID that you were referencing on your Events.

    I think it would be easier if I give you a simple example because I don't want to bore you with a long post jeje

    So here is my capx: https://www.dropbox.com/s/jgnyzrkenrc0y1x/Pick%20by%20UID%20From%20Editor.capx?dl=0

    -As you can see I'm targeting (UID =8) before the Games starts so far good

    -Now on the editor delete the green sprite with UID = 8

    -And now create another instance of the blue sprite3

    -Now let's bring back the instance that I delete from the Green sprite so make another instance of the Green sprite

    -As you can see there is no more Green Sprite with UID =8, in fact, you can create as much as you like of the green sprites and you would not get any with (UID =8) that's why I say be careful with doing these types of events referencing UID from the editor as it wouldn't be practical in the long-term as you can easily forget deleting and creating while testing etc... but obviously it's your Game you decide, I hope I didn't bore you with the long post.

    Anyway I'm glad that you fixed your problem

  • Freddy33

    I see two problems here:

    1-How could you possibly know it will exist a (Snowball with UID = 150) Before the Game starts? I see it could be done by Picking by IID if they were 151 snowballs but I cannot see this working by UID if you wanna target a Fix "Instance Number"

    2-On the collision Event construct (Picks or adds) the snowballs that are involved in the collision so you don't need the extra Pick by UID unless you wanna apply all the Actions to a different snowball that it wasn't involved on the Collision which in this case to use the Pick by UID you will need to reset the Picking.

    You can Reset the Picking by example most common three ways:

    -System >>> Pick All>>Chose "Snowball">>>Then you can use Pick by UID from any snowball

    -You can Add the snowball to a "Family" and then use the Pick by UID but choosing via the Family

    -You can Call a Function and o the Function Pick by UID

  • Try Construct 3

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

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

    2.211111 * 10 = 22.11111

    floor(22.11111) = 22

    22/10 = 2.2

    therefore floor(timer.time*10)/10

    By choosing this method OP decides if they want to run to the lowest, highest or in the middle with their number

    That is exactly what I did on my first comment

    I'm not sure if I understood correctly but is something like this what are you trying to do?

    I use Timers

    https://www.dropbox.com/s/v0gk35eq578h8cf/Timers%20PowerUp.capx?dl=0

    But then as I mentioned earlier there is another problem doing that: I Quote

    Do you know if there is any way that the timer display the whole numbers with ".0"? Like... right now it goes 4.2 > 4.1 > 4 > 3.9... It kinda bothers me xD

    it's cool :)

    I was more checking that you may you have a different way of doing what the OP needed but with the (Round, floor, etc..) as you mentioned so I could learn it as I couldn't find the way

  • > here is one way of doing that Timer = 0 I'm not sure if this is what you looking for

    >

    > dropbox.com/s/qe14e79f72wnmxp/Timers%20PowerUp2.capx

    tarek2 Perfect again, dude! Thanks a lot!

    sizcoz Thanks to you too :)

    Your welcome :)

  • set text to round(timer.time)

    alternatively replace round() with ceil() or floor()

    see construct.net/en/make-games/manuals/construct-3/system-reference/system-expressions

    he wasn't looking to round the whole "Timer" Number he needs the counter to be with one decimal "4.1" Etc... that is the first problem.

    The second problem he needs the decimal Number to show or go down to Ceros >>> "0"

    I quote:

    P.S: I want the timer to display in the format 5.0 > 4.9 > 4.8 > 4.7...

    Do you know if there is any way that the timer display the whole numbers with ".0"? Like... right now it goes 4.2 > 4.1 > 4 > 3.9... It kinda bothers me xD

  • tarek2 Yeeeesss! I did it! It is working, even though I don't quite understand what is going on hahahahaha. But yeah, I was really missing that line. Do you know if there is any way that the timer display the whole numbers with ".0"? Like... right now it goes 4.2 > 4.1 > 4 > 3.9... It kinda bothers me xD

    Anyway, big thanks again dude, you're the best

    No problem mate Glad you fixed it :)

    here is one way of doing that Timer = 0 I'm not sure if this is what you looking for

    dropbox.com/s/qe14e79f72wnmxp/Timers%20PowerUp2.capx

  • Hi andreluizgollo

    I see that you are not updating the txt to the Timer or at least not on the Pictures, how do you update the txt With the current Timer?

    Look at my capx event 5 how I update the Timer

    you can do this:

    Create another event outside the collision event

    Is biggergaps_On >>>Action Update txt to the Timer like I showed you on my Capx

    I hope it helps if not let me know

    Remember on Collision it's a Trigger Once only so whatever subevents and actions you have there it will only Run Once, so you need an Event that its True while the Timer its On

  • Okay, so I working on incorprating the example you gave me into my project, I got confused, so i went and made a "test" project of the example you showed me Gamecorpstudio. I used however Vincent advice also. So I have a better understanding on the example ,however when ever a person wins on mine "test" example the scores reset and not let them get a chance to even win. Can you explain what I did wrong? It's look exactly like your but with Vincent's example on it.

    https://www.dropbox.com/s/3vz1x59muv579mk/Test.c3p?dl=0

    Event 6 is always true it keeps resetting Global variable every 2 secs, also you comparing against a "strings" you should compare against a "Number" as you use Numbers there other ways it will be always true and it will keep resetting everything

  • andreluizgollo

    I'm not sure if I understood correctly but is something like this what are you trying to do?

    I use Timers

    https://www.dropbox.com/s/v0gk35eq578h8cf/Timers%20PowerUp.capx?dl=0

  • tarek2 Hey dude, I'm having kind of a hard time on the reference thing. Do you suggest referencing the specific instances using UID, IID...?

    you could do by "UID" all depends on your Logic but I don't think that you need the UID on this case you could just straight Pick the Object and then Spawn the PowerUp. There are many ways you could Pick the Pillar, as an example why not go for the most simple one "Pick The Nearest" I see from the Picture that You have only Two Pillar on the screen I guess 3 Max that could be at the same Time on the Screen so pick nearest it should work just fine.

    Now I don't know what its the Logic or rules you set up to spawn the PowerUp but I would probably Pick the Farthest Pillar to the Right so it gives Time to the Player to sees it in advance and therefore tries to think ahead to pick it Up.

    So the Picking will be simple just by filtering the PillarUp that are on the Screen or you could do the opposite if you like to spawn without the Player see it.

    Now To use "Pick the Nearest" you need to give coordinates (X,Y) you could use the edge of the Window screen With as an example say you have screen Window Size of

    With = 854

    Height = 480

    so the edge farthest distance to the Right it should be 854 so you could do now the Picking

    Every X Secs

    Sub>>>PillarUp Is on The Screen

    Sub>>>>PillarUp Pick The Nearest To : (X =854 , Y=0):>>>>>>>>Action Create PowerUp at (PillarUp.X, PillarUp.Y+(Your Amount)

    to make it spawn between the Pillars (top, bottom)

    Also instead to make a calculation for the Y Position you could just create a second "Image Point" on the PillarUp at the exact position where you wanna spawn the Powerup and just reference to the Image Point like this

    Every X Secs

    Sub>>>PillarUp Is on The Screen

    Sub>>>>PillarUp Pick The Nearest To : (X =854 , Y=0):>>>>>Action Create PowerUp at (PillarUp.X, PillarUp.ImagePointY(1))

    This is just one of many possibilities you could do, but I recommend you experiment with many and choose the easier for you if you have any question you can always ask

    I made a Demo for you, it's a C2 Capx but you can open it on C3

    https://www.dropbox.com/s/5enfscmchgjk22b/Flappy%20Bird.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