Counting time of animations?

Get help using Construct 2

Post » Sun Feb 10, 2013 9:08 pm

Hey guys,

Ive got another question:)

I use different animations for different weapons and I want to make a "favourite weapon"-info at the end of a match.

Is there any possibility, to compare the time, the animations are playing

like

2min machinegun
1min plasmagun

etcetc...

thanks in advance, you are a great community :) helped me a lot of time

sorry, if my english isnt perfect. im not a native....and im drunk

carnival you know ;-)

cheerio
beaverlicious
Image
Check out our start-up and configure your own helmet in true 3D.
B
42
S
11
G
11
Posts: 1,152
Reputation: 9,886

Post » Mon Feb 11, 2013 8:12 pm

one way would be to create a variable for each gun

then when the player switches to a particular weapon, you have a section that says

currentgun = "machineGun"
-> every 1 second add +1 to "machineGunTime"

then check which one is the biggest at the end of the game.

There's a fancier way with arrays, but this is the easiest way to visually understand what's going on.
B
50
S
21
G
8
Posts: 844
Reputation: 10,299

Post » Tue Feb 12, 2013 1:52 pm

sounds pretty clear now :) but what is the expression to check which variable is the biggest?

Arent there just >< and equal ?

If there is not an expression, this would be lots of events to calculate right^^

Or can i check more then one variable?
Variable MachineGun > than (VariablePlasmaGun/VariableCrossbow etc)

sry for bead english, not a native :)
Image
Check out our start-up and configure your own helmet in true 3D.
B
42
S
11
G
11
Posts: 1,152
Reputation: 9,886


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go and 26 guests