Frag System - compare variables

Get help using Construct 2

Post » Wed Jan 30, 2013 9:03 am

Hi,

I've got another question for you guys. :)

I made a 2 Player shoot-em up with a little frag System, using global variables. Now i want to implement an "multikill" function like in quake or unreal tournament. Please explain me how i can detect if one variable is added 2 points while the other doesn't change. Hope you understand what I mean, i'm not a native speaker. :)

Thx in advance,

The Beaver ;-)
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 » Wed Jan 30, 2013 7:43 pm

Edit:

Is there any possibility to check the space between two different global variables?

like

PLAYER 1: 10Points
Player 2: 15Points

Sytem detects the difference of 5 - spawns an object for example!

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 » Wed Jan 30, 2013 8:21 pm

Create a new variable called pDifference for example.

Set pDifference to abs(player1-Player2)

abs gives the absolute value, so even -5 will return 5

B
101
S
32
G
12
Posts: 1,549
Reputation: 22,003

Post » Wed Jan 30, 2013 10:56 pm

You sir, are my personal hero :)

thanks for your help, worked out fine!
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 04, 2013 3:55 pm

Great, and your welcome.
B
101
S
32
G
12
Posts: 1,549
Reputation: 22,003


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 27 guests