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
German speaking C2/3 Facebook Community

https://www.helmade.com
Check out our start-up and configure your own helmet in true 3D.
B
48
S
13
G
15
Posts: 1,175
Reputation: 12,383

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
90
S
44
G
17
Posts: 1,012
Reputation: 18,537

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 :)
German speaking C2/3 Facebook Community

https://www.helmade.com
Check out our start-up and configure your own helmet in true 3D.
B
48
S
13
G
15
Posts: 1,175
Reputation: 12,383


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 18 guests