Custom modified text output

Get help using Construct 2

Post » Mon Jan 02, 2012 2:25 am

I'll keep it short: How do i force a text output object to only display the intended output with no decimals?

Example: I have a counter, which counts how many times the player triggers a mechanic. It ads 0.5 per hit, but for some reason it doubles that, so i always end up with a round number.

So, if the player triggers 5 objects, it shows 5 at the text object, but on its way there, it shows x,5 for a fraction of a second.

If theres 100 objects to trigger within a short period of time, it will constantly show the x.5 being counted.

Catch my drift? :)
B
34
S
11
G
9
Posts: 189
Reputation: 8,595

Post » Mon Jan 02, 2012 2:48 am

show capx (:


hmmm... Chocapics? Yann2012-01-02 02:50:48
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Mon Jan 02, 2012 3:08 am

My dropbox is full atm, so i found a cheesy upload site. Do note, its the blue download button on the bottom! x)

.capxEra2012-01-02 03:53:22
B
34
S
11
G
9
Posts: 189
Reputation: 8,595

Post » Mon Jan 02, 2012 5:11 am

counting.capx

First... Using "On Frame Changed is weird" I would place the increment directly in the "On Collision event"
Also, for your bug, you just had to put the animation speed to 0 (when you edit animation you have animation speed in the property panel)
If you have some speed in your animation, even with one frame you will trigger the "On Frame Changed" on start of layout.
And I guess you will trigger it twice when switching animation.
Well... Now it works as you intended I think.
Last edited by Yann on Sun Sep 14, 2014 10:33 pm, edited 1 time in total.
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Mon Jan 02, 2012 2:43 pm

Thanks alot for clearing this up! Much appreciated :)
B
34
S
11
G
9
Posts: 189
Reputation: 8,595


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go and 23 guests