tarek2's Forum Posts

  • 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

    .

  • Here I found the best Tutorial for you

    https://www.scirra.com/manual/75/how-events-work

    Especially look at "Unreferenced objects"

  • tarek2 Yeah, I ran into this problem also. It's set to choose a number every 1.2 seconds because that's the spawn time of the pillars. Would you mind explaining a little bit about this PrePick? Or just point me to some guide/tutorial? :)

    Sure, basically if you have more than one instance of an object, in this case Pillarup, and you need to refer to a specific Pillarup then you need to Pick first which one it is on the condition other ways will count as an "unreferenced" object and if this happens c2/c3 it will automatically apply all those Actions to (Pillarup Instance = 0) which is the first instance created of those Pillarup as it doesn't know to which instance you are referring to so it will pick automatically for you (instance= 0)

    I hope I explained properly and it's not confusing

  • tarek2 Yeah, just found that out after changing the random to choose, hahahaha. I haven't used else or triggers yet, but I'm gonna take a look on those. Thanks man!

    No problem mate

    Another problem you may run into its Referencing to Pillarup if its more than one object and you don't PrePick The Pillar, this I'm not sure if you Pick or you just have one Pillar in the whole level as I cannot see the rest of the events but it is something to look into it.

    I hope it helps good luck mate

  • Also, you should put an Else

    And a Trigger once on each condition other ways you will spawn like 60 to 80 powerUps as you change the powerUp value every 1.2 sec

  • You know that you can save the TileMap As.Json and then load from As.Json right?

    I wanted to say that but I'm pretty sure you knew it already but I thought I will mention it just in case

    Capx:

    https://www.dropbox.com/s/pddfi7qwobp5tp6/Save%20TileMap%20AsJson.capx?dl=0

  • awesome. thanks a lot.

    No problem mate

    Edit

    Sorry its all good I got confused with something else :)

  • sir LoLz

    Set the Size First off the whole Array then update the Array with the For Loop

    I made a capx for you:

    https://www.dropbox.com/s/6skq3ngysl7880j/Save%20TileMap%20Into%20an%20Array.capx?dl=0

  • No Problem mate :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • RobertoFreemano use Timers instead of Wait it will give you better results.

    it is something like this you need?

    https://www.dropbox.com/s/cgds63gl4mhk3gq/Shoots%20With%20Timers.capx?dl=0