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 ;-)
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 » 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!

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 » 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
94
S
29
G
11
Posts: 1,545
Reputation: 20,993

Post » Wed Jan 30, 2013 10:56 pm

You sir, are my personal hero :)

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

Great, and your welcome.
B
94
S
29
G
11
Posts: 1,545
Reputation: 20,993


Return to How do I....?

Who is online

Users browsing this forum: jeffige and 22 guests