Author Topic: Add a variable amount to another variable?  (Read 557 times)

Is it possible to add a variable amount to your players score?

I'm trying to make it so a player earns EXP from killing enemies, but he needs to exchange them for points before he can spend them. Is this possible? If so, could someone tell me how?

You could do what I'm currenly doing in my W.I.P. TDM, which is:

[/] [0] onActivate->Self->VCE_ifValue-><var:client:score>[>=](for example, 1)
[/] [0] onVariableTrue->Client->IncScore->[-1]

What that does, if you don't know, is checks to make sure the player's score is greater than or equal to 1 when they activate the brick, and if it is greater than or equal to 1, it takes one point away from their score. You can add more stuff to that, such as:

(after the second event)
[/] [0] onVariableTrue->Player->addItem (if you have the addItem event by Destiny)->[some gun you have]

So if they have greater than or equal to 1 point, it subtracts one point from their score and gives them a weapon. I hope that works for you, if I understand correctly what you're trying to ask.

Ideaget: onPlayerTouch and then what Ky had. It'll rapidly deduct EXp.

Not exactly what I'm asking. I'll elaborate:

1.Zenthrox kills a bot.

2.Zenthrox gets 5 EXP.

3.Zenthrox clicks on a brick.

4.For every EXP point Zenthrox has, he gets one point added to his score.

5.After Zenthrox gets his points, his EXP is reduced to zero.

My main problem is step 4. Is this type of eventing possible?

you add score, decriment the var, until it hits 0

Ah, now I see. Brilliant!

Thanks.