Author Topic: How would I go about making a long-term unlockable system?  (Read 939 times)

Alright, so my TDM has a system where after you obtain a certain amount of points per round, you can use different weapons. The only problem with this is since points reset every round, you have to re-earn your weapons. I'd like to make it so your kills rack up in some sort of database that carries over each round, and after a large amount of them, you unlock said weapons. Anyone know how to go about doing so?

Maybe theres something you can do with variables to save points that could be a variable. I don't know how much your in on variables though. Other wise ask Chrono or Truce. They might know what to do.

Maybe theres something you can do with variables to save points that could be a variable. I don't know how much your in on variables though. Other wise ask Chrono or Truce. They might know what to do.
Yeah I believe if you got it to assign the points to a client variable, the variables would save through death and (maybe) minigame reset.

Something along the line of (with the new vce v5)
OnWhatever>Self>VCEModVariable>Client    PlayerScore    Add    <var:client:score>

Aww crumbs no edit :
Anyway Im not sure if trying to use a variable replacer inside a mod variable would work... using the replacer as a value... but you could try.


I use variables V4 :x
Then Im not too sure on how you would directally translate score to a variable, becauise v4 didnt have the equivilent of replacers :/  Im guessing your entire save is on V4 so I wont even suggest you get v5 because I assume you have done alot of work on it.

Im sorry but I cant think of any other ideas on how you would pull this off, other than scripting a new event (or getting someone else to).
I am not good with events however and I am sure somebody else will be able to think of an answer (I hope).

Then Im not too sure on how you would directally translate score to a variable, becauise v4 didnt have the equivilent of replacers :/  Im guessing your entire save is on V4 so I wont even suggest you get v5 because I assume you have done alot of work on it.

Im sorry but I cant think of any other ideas on how you would pull this off, other than scripting a new event (or getting someone else to).
I am not good with events however and I am sure somebody else will be able to think of an answer (I hope).

Thanks anyway.


Use that "saving variables" or "events database" thing to add people to a list of Unlocked X Weapon IDs when they first use it and have enough points to.

Use that "saving variables" or "events database" thing to add people to a list of Unlocked X Weapon IDs when they first use it and have enough points to.

But I want to make the points needed higher, so people will play more (I'm terrible ;P) and not get weapons during their first round, so I need the points to somehow carry over each round.

Then Im not too sure on how you would directally translate score to a variable, becauise v4 didnt have the equivilent of replacers :/  Im guessing your entire save is on V4 so I wont even suggest you get v5 because I assume you have done alot of work on it.

Im sorry but I cant think of any other ideas on how you would pull this off, other than scripting a new event (or getting someone else to).
I am not good with events however and I am sure somebody else will be able to think of an answer (I hope).
with V4
input>self>ifplayerscore[greaterthan][0]
onvaraibletrue>client>incscore[-1]
onvaraibletrue>client>addvariable[score][1]

opposite to get your score back

input>self>ifvariable[client][score][greaterthan][0]
onvaraibletrue>client>incscore[1]
onvaraibletrue>client>addvariable[score][-1]

with V4
input>self>ifplayerscore[greaterthan][0]
onvaraibletrue>client>incscore[-1]
onvaraibletrue>client>addvariable[score][1]

opposite to get your score back

input>self>ifvariable[client][score][greaterthan][0]
onvaraibletrue>client>incscore[1]
onvaraibletrue>client>addvariable[score][-1]

And I pose the issue of having to do something after each kill. You could kill 5 people, then get killed before you can save and you lose those 5 points.

Relay spam it?
Change the input to OnRelay
and just do a relay loop - Note - THIS MAY LAG LIKE stuff.

So OnPlayerTouch (have it as like the spawn brick)>Self>Fire relay.
OnRelay>Self>FireRelay
OnRelay>self>ifplayerscore[greaterthan][0]
onvaraibletrue>client>incscore[-1]
onvaraibletrue>client>addvariable[score][1]

Meh.... Probably a better way to do this.

Relay spam it?
Change the input to OnRelay
and just do a relay loop - Note - THIS MAY LAG LIKE stuff.

So OnPlayerTouch (have it as like the spawn brick)>Self>Fire relay.
OnRelay>Self>FireRelay
OnRelay>self>ifplayerscore[greaterthan][0]
onvaraibletrue>client>incscore[-1]
onvaraibletrue>client>addvariable[score][1]

Meh.... Probably a better way to do this.

That would probably cause some sort of catastrophic explosion. @_@

When you select a class, remove current points and translate to unlockables score.